...
Scenario: installing Rancher on clean Ubuntu 16.04 64g VM (single collocated server/host) and the master branch of onap via OOM deployment (2 3 scripts)
1 hour video of automated installation on an AWS EC2 spot instance
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
# Either (the rancher install is kicked in by the entrypoint script) git clone or just run the WIP oom_entrypoint.sh script (And swap out your own onap-parameters.yaml for amsterdam or values.yaml for master) #use the latest on https://gerritjira.onap.org/rbrowse/oom cd oom git pullOOM-710 wget https://gerritjira.onap.org/rsecure/oom refs/changes/19/32019/6 cd install/rancher ./oom_rancher_setup.sh -b master -s cd.onap.info -e onap # or just run the WIP oom_entrypoint.sh script (And swap out your own onap-parameters.yaml) #use the latest on https://jira.onap.org/browse/OOM-710 wget https://jira.onap.org/secure/attachment/LATEST_ID/oom_entrypoint.sh chmod 777 oom_entrypoint.sh ./oom_entrypoint.sh -b master -s your_ip -e onap # refer to this script that runs oom_rancher_setup.sh and cd.sh in sequence |
clone continuous deployment script - until it is merged
Code Block |
---|
wget https://jira.onap.org/secure/attachment/ID/cd.sh
chmod 777 cd.sh
wget https://jira.onap.org/secure/attachment/ID/aaiapisimpledemoopenecomporg.cer
wget https://jira.onap.org/secure/attachment/ID/onap-parameters.yaml
wget https://jira.onap.org/secure/attachment/ID/aai-cloud-region-put.json
./cd.sh -b master -e onap
# wait about 25-60 min depending on the speed of your network pulling docker images |
Results
Code Block |
---|
# dont worry about security beyond the 10249-10255 ports (the following server was terminited right after testing) ubuntu@a-ons-auto-20180410:~$ sudo ./oom_rancher_setup.sh -b master -s a-ons-auto-20180410 -e onap Installing on a-ons-auto-20180410 for master: Rancher: 1.6.14 Kubectl: 1.8.6 Helm: 2.7.2 Docker: 17.03 If you must install as non-root - comment out the docker install below - run it separately, run the user mod, logout/login and continue this script % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 15249 100 15249 0 0 70920 0 --:--:-- --:--:-- --:--:-- 71257 + sh -c apt-get update Hit:1 http://azure.archive.ubuntu.com/ubuntu xenial InRelease Get:2 http://azure.archive.ubuntu.com/ubuntu xenial-updates InRelease [102 kB] Get:3 http://azure.archive.ubuntu.com/ubuntu xenial-backports InRelease [102 kB] Get:4 http://security.ubuntu.com/ubuntu xenial-security InRelease [102 kB] Get:5 http://azure.archive.ubuntu.com/ubuntu xenial/main Sources [868 kB] Get:6 http://azure.archive.ubuntu.com/ubuntu xenial/restricted Sources [4,808 B] Get:7 http://azure.archive.ubuntu.com/ubuntu xenial/universe Sources [7,728 kB] Get:8 http://azure.archive.ubuntu.com/ubuntu xenial/multiverse Sources [179 kB] Get:9 http://azure.archive.ubuntu.com/ubuntu xenial-updates/main Sources [304 kB] Get:10 http://azure.archive.ubuntu.com/ubuntu xenial-updates/restricted Sources [2,524 B] Get:11 http://azure.archive.ubuntu.com/ubuntu xenial-updates/universe Sources [200 kB] Get:12 http://azure.archive.ubuntu.com/ubuntu xenial-updates/multiverse Sources [7,944 B] Get:13 http://azure.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages [755 kB] Get:14 http://azure.archive.ubuntu.com/ubuntu xenial-updates/main Translation-en [313 kB] Get:15 http://azure.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages [619 kB] Get:16 http://azure.archive.ubuntu.com/ubuntu xenial-updates/universe Translation-en [249 kB] Get:17 http://azure.archive.ubuntu.com/ubuntu xenial-updates/multiverse amd64 Packages [16.2 kB] Get:18 http://azure.archive.ubuntu.com/ubuntu xenial-updates/multiverse Translation-en [8,076 B] Get:19 http://azure.archive.ubuntu.com/ubuntu xenial-backports/main Sources [3,432 B] Get:20 http://azure.archive.ubuntu.com/ubuntu xenial-backports/universe Sources [5,816 B] Get:21 http://azure.archive.ubuntu.com/ubuntu xenial-backports/universe amd64 Packages [7,104 B] Get:22 http://azure.archive.ubuntu.com/ubuntu xenial-backports/universe Translation-en [3,844 B] Get:23 http://security.ubuntu.com/ubuntu xenial-security/main Sources [119 kB] Get:24 http://security.ubuntu.com/ubuntu xenial-security/restricted Sources [2,116 B] Get:25 http://security.ubuntu.com/ubuntu xenial-security/universe Sources [62.8 kB] Get:26 http://security.ubuntu.com/ubuntu xenial-security/multiverse Sources [1,516 B] Get:27 http://security.ubuntu.com/ubuntu xenial-security/main amd64 Packages [473 kB] Get:28 http://security.ubuntu.com/ubuntu xenial-security/main Translation-en [204 kB] Get:29 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages [340 kB] Get:30 http://security.ubuntu.com/ubuntu xenial-security/universe Translation-en [127 kB] Get:31 http://security.ubuntu.com/ubuntu xenial-security/multiverse amd64 Packages [3,208 B] Fetched 12.9 MB in 2s (5,702 kB/s) Reading package lists... Done + sh -c apt-get install -y -q apt-transport-https ca-certificates curl software-properties-common Reading package lists... Building dependency tree... Reading state information... ca-certificates is already he newest version (20170717~16.04.1). software-properties-common is already the newest version (0.96.20.7). The following additional packages will be installed: libcurl3-gnutls The following packages will be upgraded: apt-transport-https curl libcurl3-gnutls 3 upgraded, 0 newly installed, 0 to remove and 63 not upgraded. Need to get 349 kB of archives. After this operation, 0 B of additional disk space will be used. Get:1 http://azure.archive.ubuntu.com/ubuntu xenial-updates/main amd64 curl amd64 7.47.0-1ubuntu2.7 [138 kB] Get:2 http://azure.archive.ubuntu.com/ubuntu xenial-updates/main amd64 libcurl3-gnutls amd64 7.47.0-1ubuntu2.7 [185 kB] Get:3 http://azure.archive.ubuntu.com/ubuntu xenial-updates/main amd64 apt-transport-https amd64 1.2.26 [26.1 kB] Fetched 349 kB in 0s (16.6 MB/s) (Reading database ... 54517 files and directories currently installed.) Preparing to unpack .../curl_7.47.0-1ubuntu2.7_amd64.deb ... Unpacking curl (7.47.0-1ubuntu2.7) over (7.47.0-1ubuntu2.6) ... Preparing to unpack .../libcurl3-gnutls_7.47.0-1ubuntu2.7_amd6.deb ... Unpacking libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.7) over (7.47.0-1ubuntu2.6) ... Preparing to unpack .../apt-transport-https_1.2.26_amd64.deb ... Unpacking apt-transport-https (1.2.26) over (1.2.25) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Setting up libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.7) ... Setting up curl (7.47.0-1ubuntu2.7) ... Setting up apt-transport-https (1.2.26) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... + curl -fsSl https://download.docker.com/linux/ubuntu/gpg + sh -c apt-key add - OK + sh -c add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu xenial stable" + [ ubuntu = debian ] + sh -c apt-get update Hit:1 http://azure.archive.ubuntu.com/ubuntu xenial InRelease Hit:2 http://azure.archive.ubuntu.com/ubuntu xenial-updates InRelease Hit:3 http://azure.archive.ubuntu.com/ubuntu xenial-backports InRelease Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease Get:5 https://download.docker.com/linux/ubuntu xenial InRelease [65.8 kB] Get:6 https://download.docker.com/linux/ubuntu xenial/stable amd64 Packages [3,539 B] Fetched 69.3 kB in 0s (185 kB/s) Reading package lists... Done + apt-cache madison docker-ce + grep 17.03.2 + head+ cut -d -f 4 -n 1 + sh -c apt-get install -y -q docker-ce=17.03.2~ce-0~ubuntu-xenial Reading package lists... Building dependency tree... Reading state information... The following additional packages will be installed: aufs-tools cgroupfs-mount libltdl7 Suggested packages: mountall The following NEW packages will be installed: aufs-tools cgroupfs-mount docker-ce libltdl7 0 upgraded, 4 newly installed, 0 to remove and 63 not upgraded. Need to get 19.2 MB/19.3 MB of archives. After this operation, 89.4 MB of additional disk space will be used. Get:1 http://azure.archive.ubuntu.com/ubuntu xenial/main amd64 libltdl7 amd64 2.4.6-0.1 [38.3 kB] Get:2 https://download.docker.com/linux/ubuntu xenial/stable amd64 docker-ce amd64 17.03.2~ce-0~ubuntu-xenial [19.2 MB] Fetched 19.2 MB in 0s (20.2 MB/s) Selecting previously unselected package aufs-tools. (Reading database ... 54517 files and directories currently installed.) Preparing to unpack .../aufs-tools_1%3a3.2+20130722-1.1ubuntu1_amd64.deb ... Unpacking aufs-tools (1:3.2+20130722-1.1ubuntu1) ... Selecting previously unselected package cgroupfs-mount. Preparing to unpack .../cgroupfs-mount_1.2_all.deb ... Unpacking cgroupfs-mount (1.2) ... Selecting previously unselected package libltdl7:amd64. Preparing to unpack .../libltdl7_2.4.6-0.1_amd64.deb ... Unpacking libltdl7:amd64 (2.4.6-0.1) ... Selecting previously unselected package docker-ce. Preparing to unpack .../docker-ce_17.03.2~ce-0~ubuntu-xenial_amd64.deb ... Unpacking docker-ce (17.03.2~ce-0~ubuntu-xenial) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for man-db (2.7.5-1) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for systemd (229-4ubuntu21.1) ... Setting up aufs-tools (1:3.2+20130722-1.1ubuntu1) ... Setting up cgroupfs-mount (1.2) ... Setting up libltdl7:amd64 (2.4.6-0.1) ... Setting up docker-ce (17.03.2~ce-0~ubuntu-xenial) ... sent invalidate(passwd) request, exiting sent invalidate(group) request, exiting sent invalidate(group) request, exiting Processing triggers for libc-bin (2.23-0ubuntu10) ... Processing triggers for systemd (229-4ubuntu21.1) ... Processing triggers for ureadahead (0.100.0-19) ... + sh -c docker version Client: Version: 17.03.2-ce API version: 1.27 Go version: go1.7.5 Git commit: f5ec1e2 Built: Tue Jun 27 03:35:14 2017 OS/Arch: linux/amd64 Server: Version: 17.03.2-ce API version: 1.27 (minimum version 1.12) Go version: go1.7.5 Git commit: f5ec1e2 Built: Tue Jun 27 03:35:14 2017 OS/Arch: linux/amd64 Experimental: false If you would like to use Docker as a non-root user, you should now consider adding your user to the "docker" group with something like: sudo usermod -aG docker your-user Remember that you will have to log out and back in for this to take effect! WARNING: Adding a user to the "docker" group will grant the ability to run containers which can be used to obtain root privileges on the docker host. Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface for more information. install make - required for beijing+ Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: make-doc The following NEW packages will be installed: make 0 upgraded, 1 newly installed, 0 to remove and 64 not upgraded. Need to get 151 kB of archives. After this operation, 365 kB of additional disk space will be used. Get:1 http://azure.archive.ubuntu.com/ubuntu xenial/main amd64 make amd64 4.1-6 [151 kB] Fetched 151 kB in 0s (1,647 kB/s) Selecting previously unselected package make. (Reading database ... 54792 files and directories currently installed.) Preparing to unpack .../archives/make_4.1-6_amd64.deb ... Unpacking make (4.1-6) ... Processing triggers for man-db (2.7.5-1) ... Setting up make (4.1-6) ... Unable to find image 'rancher/server:v1.6.14' locally v1.6.14: Pulling from rancher/server bae382666908: Pull complete 29ede3c02ff2: Pull complete da4e69f33106: Pull complete 8d43e5f5d27f: Pull complete b0de1abb17d6: Pull complete 422f47db4517: Pull complete 79d37de643ce: Pull complete 69d13e08a4fe: Pull complete 2ddfd3c6a2b7: Pull complete bc433fed3823: Pull complete b82e188df556: Pull complete dae2802428a4: Pull complete a6247572ea3c: Pull complete 884c916ebae4: Pull complete 85517c9c5365: Pull complete 02dded9fe690: Pull complete fd9f433c3bc6: Pull complete 44d91b3fea45: Pull complete 0d463387dfeb: Pull complete 60753c4d26f0: Pull complete a003892966fe: Pull complete Digest: sha256:42441f0128fae4d72d51f92de2049392427d462356282a46f28434332967c7e4 Status: Downloaded newer image for rancher/server:v1.6.14 358dde9e8f883f0b498bfa6430b4984688e751926c09a1320906a638aee4a94e % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 49.9M 100 49.9M 0 0 87.9M 0 --:--:-- --:--:-- --:--:-- 87.8M --2018-04-11 02:43:29-- http://storage.googleapis.com/kubernetes-helm/helm-v2.7.2-linux-amd64.tar.gz Resolving storage.googleapis.com (storage.googleapis.com)... 172.217.5.240, 2607:f8b0:4004:804::2010 Connecting to storage.googleapis.com (storage.googleapis.com)|172.217.5.240|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 12166338 (12M) [application/x-tar] Saving to: ‘helm-v2.7.2-linux-amd64.tar.gz’ helm-v2.7.2-linux-amd64.tar.gz 100%[=========================================================================================>] 11.60M --.-KB/s in 0.04s 2018-04-11 02:43:29 (261 MB/s) - ‘helm-v2.7.2-linux-amd64.tar.gz’ saved [12166338/12166338] linux-amd64/ linux-amd64/README.md linux-amd64/LICENSE linux-amd64/helm Creating /home/ubuntu/.helm Creating /home/ubuntu/.helm/repository Creating /home/ubuntu/.helm/repository/cache Creating /home/ubuntu/.helm/repository/local Creating /home/ubuntu/.helm/plugins Creating /home/ubuntu/.helm/starters Creating /home/ubuntu/.helm/cache/archive Creating /home/ubuntu/.helm/repository/repositories.yaml Adding stable repo with URL: https://kubernetes-charts.storage.googleapis.com Adding local repo with URL: http://127.0.0.1:8879/charts $HELM_HOME has been configured at /home/ubuntu/.helm. Error: error installing: Post http://localhost:8080/apis/extensions/v1beta1/namespaces/kube-system/deployments: dial tcp 127.0.0.1:8080: getsockopt: connection refused --2018-04-11 02:43:30-- https://releases.rancher.com/cli/v0.6.7/rancher-linux-amd64-v0.6.7.tar.gz Resolving releases.rancher.com (releases.rancher.com)... 104.24.17.51, 104.24.16.51, 2400:cb00:2048:1::6818:1133, ... Connecting to releases.rancher.com (releases.rancher.com)|104.24.17.51|:443... connected. HTTP request sent, awaiting response... 200 OK Length: 3736787 (3.6M) [application/x-tar] Saving to: ‘rancher-linux-amd64-v0.6.7.tar.gz’ rancher-linux-amd64-v0.6.7.tar.gz 100%[=========================================================================================>] 3.56M 4.47MB/s in 0.8s 2018-04-11 02:43:31 (4.47 MB/s) - ‘rancher-linux-amd64-v0.6.7.tar.gz’ saved [3736787/3736787] ./ ./rancher-v0.6.7/ ./rancher-v0.6.7/rancher install jq Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed: libonig2 The following NEW packages will be installed: jq libonig2 0 upgraded, 2 newly installed, 0 to remove and 64 not upgraded. Need to get 232 kB of archives. After this operation, 829 kB of additional disk space will be used. Get:1 http://azure.archive.ubuntu.com/ubuntu xenial/universe amd64 libonig2 amd64 5.9.6-1 [88.1 kB] Get:2 http://azure.archive.ubuntu.com/ubuntu xenial/universe amd64 jq amd64 1.5+dfsg-1 [144 kB] Fetched 232 kB in 0s (10.7 MB/s) Selecting previously unselected package libonig2:amd64. (Reading database ... 54808 files and directories currently installed.) Preparing to unpack .../libonig2_5.9.6-1_amd64.deb ... Unpacking libonig2:amd64 (5.9.6-1) ... Selecting previously unselected package jq. Preparing to unpack .../jq_1.5+dfsg-1_amd64.deb ... Unpacking jq (1.5+dfsg-1) ... Processing triggers for man-db (2.7.5-1) ... Setting up libonig2:amd64 (5.9.6-1) ... Setting up jq (1.5+dfsg-1) ... Processing triggers for libc-bin (2.23-0ubuntu10) ... wait for rancher server container to finish - 3 min 2 more min 1 min left start helm server Regenerating index. This may take a moment. Now serving you on 127.0.0.1:8879 add local helm repo "local" has been added to your repositories NAME URL stable https://kubernetes-charts.storage.googleapis.com local http://127.0.0.1:8879 get public and private tokens back to the rancher server so we can register the client later API_RESPONSE: {"id":"1c2","type":"apiKey","links":{"self":"http:\/\/127.0.0.1:8880\/v2-beta\/apikeys\/1c2","account":"http:\/\/127.0.0.1:8880\/v2-beta\/apikeys\/1c2\/account","images":"http:\/\/127.0.0.1:8880\/v2-beta\/apikeys\/1c2\/images","instances":"http:\/\/127.0.0.1:8880\/v2-beta\/apikeys\/1c2\/instances","certificate":"http:\/\/127.0.0.1:8880\/v2-beta\/apikeys\/1c2\/certificate"},"actions":{"activate":"http:\/\/127.0.0.1:8880\/v2-beta\/apikeys\/1c2\/?action=activate","remove":"http:\/\/127.0.0.1:8880\/v2-beta\/apikeys\/1c2\/?action=remove","deactivate":"http:\/\/127.0.0.1:8880\/v2-beta\/apikeys\/1c2\/?action=deactivate"},"baseType":"credential","name":null,"state":"registering","accountId":"1a1","created":"2018-04-11T02:46:55Z","createdTS":1523414815000,"data":{},"description":null,"kind":"apiKey","publicValue":"A667CF51CE002ED229C0","removeTime":null,"removed":null,"secretValue":"fzYCWhWEN9vjaXp2xwRReYMMENEi4kvG78Xx2wDo","transitioning":"yes","transitioningMessage":"In Progress","transitioningProgress":null,"uuid":"714f1255-2c2b-4cf3-b6fd-adecdceb3555"} publicValue: A667CF51CE002ED229C0 secretValue: fzYCWhWEN9vjaXp2xwRReYMMENEi4kvG78Xx2wDo ID NAME ORCHESTRATION STATE CREATED 1a5 Default cattle active 2018-04-11T02:44:34Z wait 60 sec for rancher environments can settle before we create the onap kubernetes one Creating kubernetes environment named onap env id: 1a7 you should see an additional kubernetes environment usually with id 1a7 ID NAME ORCHESTRATION STATE CREATED 1a5 Default cattle active 2018-04-11T02:44:34Z 1a7 onap kubernetes registering 2018-04-11T02:47:55Z sleep 90 to wait for REG to ACTIVE ID NAME ORCHESTRATION STATE CREATED 1a5 Default cattle active 2018-04-11T02:44:34Z 1a7 onap kubernetes registering 2018-04-11T02:47:55Z check on environments again before registering the URL response ID NAME ORCHESTRATION STATE CREATED 1a5 Default cattle active 2018-04-11T02:44:34Z 1a7 onap kubernetes active 2018-04-11T02:47:55Z ID NAME ORCHESTRATION STATE CREATED 1a5 Default cattle active 2018-04-11T02:44:34Z 1a7 onap kubernetes active 2018-04-11T02:47:55Z % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1186 100 1168 100 18 15528 239 --:--:-- --:--:-- --:--:-- 15573 REG_URL_RESPONSE: {"id":"1c3","type":"registrationToken","links":{"self":"http:\/\/a-ons-auto-20180410:8880\/v1\/projects\/1a7\/registrationtokens\/1c3","account":"http:\/\/a-ons-auto-20180410:8880\/v1\/projects\/1a7\/registrationtokens\/1c3\/account","images":"http:\/\/a-ons-auto-20180410:8880\/v1\/projects\/1a7\/registrationtokens\/1c3\/images","instances":"http:\/\/a-ons-auto-20180410:8880\/v1\/projects\/1a7\/registrationtokens\/1c3\/instances"},"actions":{"activate":"http:\/\/a-ons-auto-20180410:8880\/v1\/projects\/1a7\/registrationtokens\/1c3\/?action=activate","remove":"http:\/\/a-ons-auto-20180410:8880\/v1\/projects\/1a7\/registrationtokens\/1c3\/?action=remove","deactivate":"http:\/\/a-ons-auto-20180410:8880\/v1\/projects\/1a7\/registrationtokens\/1c3\/?action=deactivate"},"baseType":"credential","name":null,"state":"registering","accountId":"1a7","command":null,"created":"2018-04-11T02:49:26Z","createdTS":1523414966000,"description":null,"image":null,"kind":"registrationToken","registrationUrl":null,"removed":null,"token":null,"transitioning":"yes","transitioningMessage":"In Progress","transitioningProgress":null,"uuid":"812bd898-b4a9-4ae2-8620-5471ef507022"} wait for server to finish url configuration - 3 min 60 more sec % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Spee 100 3183 0 3183 0 0 316k 0 --:--:-- --:--:-- --:--:-- 345k REGISTRATION_TOKENS: {"type":"collection","resourceType":"registrationToken","links":{"self":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens"},"createTypes":{},"actions":{},"data":[{"id":"1c3","type":"registrationToken","links":{"self":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens\/1c3","account":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens\/1c3\/account","images":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens\/1c3\/images","instances":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens\/1c3\/instances","registrationUrl":"http:\/\/127.0.0.1:8880\/v2-beta\/scripts\/52477FCC4BBC8CA128D6:1514678400000:m6JJU72CklZ05UUYTfjfu6ELU8Y"},"actions":{"update":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens\/1c3\/?action=update","deactivate":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens\/1c3\/?action=deactivate"},"baseType":"credential","name":null,"state":"active","accountId":"1a7","command":"sudo docker run --rm --privileged -v \/var\/run\/docker.sock:\/var\/run\/docker.sock -v \/var\/lib\/rancher:\/var\/lib\/rancher rancher\/agent:v1.2.9 http:\/\/127.0.0.1:8880\/v2-beta\/scripts\/52477FCC4BBC8CA128D6:1514678400000:m6JJU72CklZ05UUYTfjfu6ELU8Y","created":"2018-04-11T02:49:26Z","createdTS":1523414966000,"data":{},"description":null,"image":"rancher\/agent:v1.2.9","kind":"registrationToken","registrationUrl":"http:\/\/127.0.0.1:8880\/v2-beta\/scripts\/52477FCC4BBC8CA128D6:1514678400000:m6JJU72CklZ05UUYTfjfu6ELU8Y","removeTime":null,"removed":null,"token":"52477FCC4BBC8CA128D6:1514678400000:m6JJU72CklZ05UUYTfjfu6ELU8Y","transitioning":"no","transitioningMessage":null,"transitioningProgress":null,"uuid":"812bd898-b4a9-4ae2-8620-5471ef507022","windowsCommand":"docker run --rm -v \"C:\\Program Files\\rancher:C:\\Program Files\\rancher\" rancher\/agent-windows:v0.1.0"}],"sortLinks":{"accountId":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=accountId","created":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=created","description":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=description","id":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=id","kind":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=kind","name":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=name","publicValue":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=publicValue","registryId":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=registryId","removeTime":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=removeTime","removed":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=removed","secretValue":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=secretValue","state":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=state","uuid":"http:\/\/127.0.0.1:8880\/v2-beta\/registrationtokens?sort=uuid"},"pagination":{"first":null,"previous":null,"next":null,"limit":100,"total":null,"partial":false},"sort":null,"filters":{"accountId":null,"created":null,"description":null,"id":null,"kind":null,"name":null,"publicValue":null,"registryId":null,"removeTime":null,"removed":null,"secretValue":null,"state":null,"uuid":null},"createDefaults":{}} Registering host for image: rancher/agent:v1.2.9 url: http://127.0.0.1:8880/v2-beta/scripts/52477FCC4BBC8CA128D6:1514678400000:m6JJU72CklZ05UUYTfjfu6ELU8Y registrationToken: 52477FCC4BBC8CA128D6:1514678400000:m6JJU72CklZ05UUYTfjfu6ELU8Y Unable to find image 'rancher/agent:v1.2.9' locally v1.2.9: Pulling from rancher/agent b3e1c725a85f: Pull complete 6a710864a9fc: Pull complete d0ac3b234321: Pull complete 87f567b5cf58: Pull complete 063e24b217c4: Pull complete d0a3f58caef0: Pull complete 16914729cfd3: Pull complete dc5c21984c5b: Pull complete d7e8f9784b20: Pull complete Digest: sha256:c21255ac4d94ffbc7b523f870f2aea5189b68fa3d642800adb4774aab4748e66 Status: Downloaded newer image for rancher/agent:v1.2.9 INFO: Running Agent Registration Process, CATTLE_URL=http://a-ons-auto-20180410:8880/v1 INFO: Attempting to connect to: http://a-ons-auto-20180410:8880/v1 INFO: http://a-ons-auto-20180410:8880/v1 is accessible INFO: Inspecting host capabilities INFO: Boot2Docker: false INFO: Host writable: true INFO: Token: xxxxxxxx INFO: Running registration INFO: Printing Environment INFO: ENV: CATTLE_ACCESS_KEY=B59B18EE1100F446E4C9 INFO: ENV: CATTLE_HOME=/var/lib/cattle INFO: ENV: CATTLE_REGISTRATION_ACCESS_KEY=registrationToken INFO: ENV: CATTLE_REGISTRATION_SECRET_KEY=xxxxxxx INFO: ENV: CATTLE_SECRET_KEY=xxxxxxx INFO: ENV: CATTLE_URL=http://a-ons-auto-20180410:8880/v1 INFO: ENV: DETECTED_CATTLE_AGENT_IP=172.17.0.1 INFO: ENV: RANCHER_AGENT_IMAGE=rancher/agent:v1.2.9 INFO: Launched Rancher Agent: 307061b6586f1f6d881b2bd0cca6016ebe5134d53971f046c4c8fc289a095a12 waiting 7 min for host registration to finish 1 more min KUBECTL_TOKEN base64 encoded: QmFzaWMgUVRZMk4wTkdOVEZEUlRBd01rVkVNakk1UXpBNlpucFpRMWRvVjBWT09YWnFZVmh3TW5oM1VsSmxXVTFOUlU1RmFUUnJka2MzT0ZoNE1uZEVidz09 run the following if you installed a higher kubectl version than the server helm init --upgrade Verify all pods up on the kubernetes system - will return localhost:8080 until a host is added kubectl get pods --all-namespaces NAMESPACE NAME READY STATUS RESTARTS AGE kube-system heapster-76b8cd7b5-d8z2k 1/1 Running 0 4m kube-system kube-dns-5d7b4487c9-925r8 3/3 Running 0 4m kube-system kubernetes-dashboard-f9577fffd-sd797 1/1 Running 0 4m kube-system monitoring-grafana-997796fcf-t75qt 1/1 Running 0 4m kube-system monitoring-influxdb-56fdcd96b-wfb2q 1/1 Running 0 4m kube-system tiller-deploy-cc96d4f6b-2j5fq 1/1 Running 0 4m ubuntu@a-ons-auto-20180410:~$ sudo ./cdattachment/LATEST_ID/oom_entrypoint.sh chmod 777 oom_entrypoint.sh ./oom_entrypoint.sh -b master -e onap -c true -d false -w false -r false # will post a curl REST get/post in a minute |
...
s your_ip/dns-name -e onap
# refer to this script that runs oom_rancher_setup.sh and cd.sh in sequence
|
Manual Quickstart Installation - Please use script instead
...
(on each host) add to your /etc/hosts to point your ip to your hostname (add your hostname to the end). Add entries for all other hosts in your cluster. For example on openlab - you will need to add the name of your host before you install docker - to avoid the error below sudo: unable to resolve host onap-oom
Open Ports On most hosts like openstack or EC2 you can open all the ports or they are open by default - on some environments like Rackspace VM's you need to open them
Fix virtual memory allocation (to allow onap-log:elasticsearch to come up under Rancher 1.6.11+)
clone oom (scp your onap_rsa private key first - or clone anon - Ideally you get a full gerrit account and join the community) see ssh/http/http access links below https://gerrit.onap.org/r/#/admin/projects/oom
(on each host (server and client(s) which may be the same machine)) Install only the 17.03.2 version of Docker (the only version that works with Kubernetes in Rancher 1.6.13+) Install Docker
Pre pull docker images the first time you install onap. Currently the pre-pull will take 16-180 min depending on your network. Pre pulling the images will allow the entire ONAP to start in 3-8 min instead of up to 3 hours. - OOM-328Preload docker images script before createAll.bash will allow 7 min startup REOPENED Use script above in oom/kubernetes/config once it is merged. https://git.onap.org/oom/tree/kubernetes/config/prepull_docker.sh
To monitor when prepull is finished see section: Prepulldockerimages. It is advised to wait until pre pull has finished before continuing. (on the master only) Install rancher (Optional: use 8880 instead of 8080 if there is a conflict) - note there may be issues with the dns pod in Rancher after a reboot or when running clustered hosts - a clean system will be OK -
In Rancher UI - dont use (http://127.0.0.1:8880) - use the real IP address - so the client configs are populated correctly with callbacks You must deactivate the default CATTLE environment - by adding a KUBERNETES environment - and Deactivating the older default CATTLE one - your added hosts will attach to the default
Register your hostRegister your host(s) - run following on each host (including the master if you are collocating the master/host on a single machine/vm) For each host, In Rancher > Infrastructure > Hosts. Select "Add Host" The first time you add a host - you will be presented with a screen containing the routable IP - hit save only on a routable IP. Enter IP of host: (if you launched racher with 127.0.0.1/localhost - otherwise keep it empty - it will autopopulate the registration with the real IP) Copy command to register host with Rancher, Execute command on each host, for example:
wait for kubernetes menu to populate with the CLI Install KubectlThe following will install kubectl (for Kubernetes 1.8.6 ) https://github.com/kubernetes/kubernetes/issues/57528 on a linux host. Once configured, this client tool will provide management of a Kubernetes cluster.
Paste kubectl config from Rancher (you will see the CLI menu in Rancher / Kubernetes after the k8s pods are up on your host) Click on "Generate Config" to get your content to add into .kube/config Verify that Kubernetes config is good
Install HelmThe following will install Helm - currently 2.87.0 2 on a linux host. Helm is used by OOM for package and configuration management. https://lists.onap.org/pipermail/onap-discuss/2018-January/007674.html Prerequisite: Install Kubectl (2.6.1 comes with Rancher 1.6.14 - for master)
NOTE: If helm version takes long time and eventually errors out, this is most likely because incoming access to port 10250 (exposed by kubelet) is blocked by firewall. Make sure to configure firewall accordingly |