Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
nomad-lab
nomad-FAIR
Commits
6e1d3cb4
Commit
6e1d3cb4
authored
Mar 06, 2019
by
Markus Scheidgen
Browse files
Added some ops related scripts.
parent
36d57097
Pipeline
#44797
canceled with stages
in 9 minutes and 41 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
examples/test.py
View file @
6e1d3cb4
...
...
@@ -9,8 +9,8 @@ import math
from
urllib.parse
import
urlparse
from
concurrent.futures
import
ThreadPoolExecutor
nomad_url
=
'http://enc-staging-nomad.esc.rzg.mpg.de/fairdi/nomad/migration/api'
#
nomad_url = 'http://localhost:8000/nomad/api/'
#
nomad_url = 'http://enc-staging-nomad.esc.rzg.mpg.de/fairdi/nomad/migration/api'
nomad_url
=
'http://localhost:8000/nomad/api/'
user
=
'admin'
password
=
'password'
...
...
@@ -22,15 +22,7 @@ http_client = RequestsClient()
http_client
.
set_basic_auth
(
host
,
user
,
password
)
client
=
SwaggerClient
.
from_url
(
'%s/swagger.json'
%
nomad_url
,
http_client
=
http_client
)
# uploads = [upload.upload_id for upload in client.uploads.get_uploads().response().result]
uploads
=
[
'SJSSLPKiR1mm6a_kSJAGZQ'
,
'nfMmrzGBTjmx77g9_C59fw'
,
'pglT7PYDQ0aB69FBbgIkRg'
,
'KXaaC5RASryl0wfuiEEUMA'
,
'xRSZ4xCnQ7uRL-uhtL3cSw'
]
uploads
=
[
upload
.
upload_id
for
upload
in
client
.
uploads
.
get_uploads
().
response
().
result
]
executor
=
ThreadPoolExecutor
(
max_workers
=
10
)
...
...
ops/kubernetes_install.sh
0 → 100644
View file @
6e1d3cb4
#!/bin/sh
# add yum repo
cat
<<
EOF
> /etc/yum.repos.d/kubernetes.repo
[kubernetes]
name=Kubernetes
baseurl=https://packages.cloud.google.com/yum/repos/kubernetes-el7-x86_64
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://packages.cloud.google.com/yum/doc/yum-key.gpg https://packages.cloud.google.com/yum/doc/rpm-package-key.gpg
exclude=kube*
EOF
# delete old
yum erase
-y
kubelet kubeadm kubectl
--disableexcludes
=
kubernetes
# Set SELinux in permissive mode (effectively disabling it)
setenforce 0
sed
-i
's/^SELINUX=enforcing$/SELINUX=permissive/'
/etc/selinux/config
yum
install
-y
kubelet kubeadm kubectl
--disableexcludes
=
kubernetes
systemctl
enable
--now
kubelet
# firewall
firewall-cmd
--permanent
--add-port
=
6443/tcp
firewall-cmd
--permanent
--add-port
=
2379-2380/tcp
firewall-cmd
--permanent
--add-port
=
10250/tcp
firewall-cmd
--permanent
--add-port
=
10251/tcp
firewall-cmd
--permanent
--add-port
=
10252/tcp
firewall-cmd
--permanent
--add-port
=
10255/tcp
firewall-cmd
--reload
modprobe br_netfilter
# routing
cat
<<
EOF
> /etc/sysctl.d/k8s.conf
net.bridge.bridge-nf-call-ip6tables = 1
net.bridge.bridge-nf-call-iptables = 1
EOF
sysctl
--system
# start it up
systemctl daemon-reload
systemctl restart kubelet
echo
"Still have to use kubeadm init/join"
\ No newline at end of file
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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