Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
dedbd414
Commit
dedbd414
authored
Mar 16, 2017
by
Eric Cano
Browse files
Added kubernetes DNS, log PV and various fixes.
parent
e066d85c
Changes
8
Hide whitespace changes
Inline
Side-by-side
continuousintegration/buildtree_runner/DNS/dns-svc.yaml
0 → 100644
View file @
dedbd414
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
kube-dns
namespace
:
kube-system
labels
:
k8s-app
:
kube-dns
kubernetes.io/cluster-service
:
"
true"
kubernetes.io/name
:
"
KubeDNS"
spec
:
selector
:
k8s-app
:
kube-dns
clusterIP
:
<%= @dns_clusterip -%>
ports
:
-
name
:
dns
port
:
53
protocol
:
UDP
-
name
:
dns-tcp
port
:
53
protocol
:
TCP
continuousintegration/buildtree_runner/DNS/kube-system_ns.yaml
0 → 100644
View file @
dedbd414
apiVersion
:
v1
kind
:
Namespace
metadata
:
name
:
kube-system
continuousintegration/buildtree_runner/DNS/pod-dns.yaml
0 → 100644
View file @
dedbd414
apiVersion
:
v1
kind
:
ReplicationController
metadata
:
name
:
kube-dns-v20
namespace
:
kube-system
labels
:
k8s-app
:
kube-dns
version
:
v20
kubernetes.io/cluster-service
:
"
true"
spec
:
replicas
:
1
selector
:
k8s-app
:
kube-dns
version
:
v20
template
:
metadata
:
labels
:
k8s-app
:
kube-dns
version
:
v20
kubernetes.io/cluster-service
:
"
true"
spec
:
containers
:
-
name
:
kubedns
image
:
gcr.io/google_containers/kubedns-amd64:1.8
resources
:
# TODO: Set memory limits when we've profiled the container for large
# clusters, then set request = limit to keep this container in
# guaranteed class. Currently, this container falls into the
# "burstable" category so the kubelet doesn't backoff from restarting it.
limits
:
cpu
:
100m
memory
:
200Mi
requests
:
cpu
:
100m
memory
:
100Mi
args
:
# command = "/kube-dns"
-
--domain=<%= @dns_domainname -%>
-
--dns-port=10053
-
--kube-master-url=http://<%= @my_ipaddress -%>:8080
ports
:
-
containerPort
:
10053
name
:
dns-local
protocol
:
UDP
-
containerPort
:
10053
name
:
dns-tcp-local
protocol
:
TCP
-
name
:
dnsmasq
image
:
gcr.io/google_containers/kube-dnsmasq-amd64:1.4
args
:
-
--cache-size=1000
-
--no-resolv
-
--server=/<%= @dns_domainname -%>/127.0.0.1#10053
-
--server=<%= @upper_level_dns -%>
ports
:
-
containerPort
:
53
name
:
dns
protocol
:
UDP
-
containerPort
:
53
name
:
dns-tcp
protocol
:
TCP
dnsPolicy
:
Default
# Don't use cluster DNS.
continuousintegration/buildtree_runner/DNS/setup_DNS.sh
0 → 100644
View file @
dedbd414
#!/bin/bash
echo
"Setting up DNS..."
dns_clusterip
=
'10.254.199.254'
dns_domainname
=
`
hostname
-d
`
my_ipaddress
=
`
hostname
-i
`
upper_level_dns
=
`
perl
-e
'while (<>) { if ($_=~ /nameserver (.*)/) { print $1."\n"; exit }}'
< /etc/resolv.conf
`
dnspoddir
=
$(
mktemp
-d
)
cp
dns-svc.yaml pod-dns.yaml
${
dnspoddir
}
perl
-p
-i
-e
's/<%= \@dns_clusterip -%>/'
"
${
dns_clusterip
}
"
'/'
${
dnspoddir
}
/dns-svc.yaml
perl
-p
-i
-e
's/<%= \@dns_domainname -%>/'
"
${
dns_domainname
}
"
'/'
${
dnspoddir
}
/pod-dns.yaml
perl
-p
-i
-e
's/<%= \@my_ipaddress -%>/'
"
${
my_ipaddress
}
"
'/'
${
dnspoddir
}
/pod-dns.yaml
perl
-p
-i
-e
's/<%= \@upper_level_dns -%>/'
"
${
upper_level_dns
}
"
'/'
${
dnspoddir
}
/pod-dns.yaml
kubectl create
-f
${
dnspoddir
}
/kube-system_ns.yaml
kubectl create
-f
${
dnspoddir
}
/dns-svc.yaml
kubectl create
-f
${
dnspoddir
}
/pod-dns.yaml
echo
"DONE"
continuousintegration/buildtree_runner/log_PV.yaml
0 → 100644
View file @
dedbd414
apiVersion
:
v1
kind
:
PersistentVolume
metadata
:
name
:
log
labels
:
type
:
logs
spec
:
capacity
:
storage
:
2Gi
accessModes
:
-
ReadWriteMany
persistentVolumeReclaimPolicy
:
Recycle
hostPath
:
path
:
/shared/logs
continuousintegration/buildtree_runner/recreate_buildtree_running_environment.sh
View file @
dedbd414
...
...
@@ -20,7 +20,7 @@ yum-config-manager --add-repo=./castor.repo
################################################################################
### Make sure necessary packages are installed.
echo
Installing mhvtl and tape utils...
yum
install
-y
kmod-mhvtl mhvtl-utils lsscsi mt-st mtx sg3_utils
yum
install
-y
kmod-mhvtl mhvtl-utils lsscsi mt-st mtx sg3_utils
jq
################################################################################
### puppet:///modules/hg_cta/00-cta-tape.rules
...
...
@@ -67,4 +67,8 @@ sleep 2
echo
Generating kubernetes persistent volumes
bash
-x
./generate_librarydevice_PV.sh
################################################################################
### puppet:///modules/hg_cta/generate_PV.sh
echo
Generating the log persistent volume
sudo
kubectl create
-f
./log_PV.yaml
sudo
kubectl get persistentvolumes
-l
type
=
logs
continuousintegration/orchestration/create_instance.sh
View file @
dedbd414
...
...
@@ -70,7 +70,7 @@ if [ ! -z "${buildtree}" ]; then
# Create temporary directory for modified pod files
poddir
=
$(
mktemp
-d
)
cp
pod-
*
${
poddir
}
sed
-i
${
poddir
}
/pod-
*
-e
"s/
\(
^
\s\+
image
:
\)
.*/
\1
buildtree-runner/"
sed
-i
${
poddir
}
/pod-
*
-e
"s/
\(
^
\s\+
image
\)
:
.*/
\1
:
buildtree-runner
\n\1
PullPolicy: Never
/"
if
[
!
-z
"
${
error
}
"
]
;
then
echo
-e
"ERROR:
\n
${
error
}
"
...
...
cta.spec.in
View file @
dedbd414
...
...
@@ -54,6 +54,7 @@ BuildRequires: libuuid-devel >= 2.17
BuildRequires: json-c-devel >= 0.11
BuildRequires: libattr-devel >= 2.4.44
BuildRequires: oracle-instantclient12.1-devel
BuildRequires: valgrind
%endif
# only build debug info if you're building the whole code
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment