diff options
Diffstat (limited to 'deployment')
13 files changed, 46 insertions, 72 deletions
diff --git a/deployment/heat/onap-oom/env/gwu/onap.env b/deployment/heat/onap-oom/env/gwu/onap.env index 3ca447d70..1a9aa9a82 100644 --- a/deployment/heat/onap-oom/env/gwu/onap.env +++ b/deployment/heat/onap-oom/env/gwu/onap.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 192.168.1.51:3142 docker_proxy: 192.168.1.51:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m2.xxlarge public_net_id: 024582bd-ef9b-48b9-9e70-e6732559d9df diff --git a/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env b/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env index 0365c751c..88d6b7492 100644 --- a/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env +++ b/deployment/heat/onap-oom/env/huawei/onap-beijing-oom.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 10.145.122.118:3142 docker_proxy: 10.145.122.118:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m2.xxlarge public_net_id: 3a6247f1-fac6-4167-a49f-33cc8415ccf4 diff --git a/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test.env b/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test.env index 442d9fd76..405008380 100644 --- a/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test.env +++ b/deployment/heat/onap-oom/env/tlab/ETE-HEAT-Test.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 192.168.31.204:3142 docker_proxy: 192.168.31.204:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m2.xxlarge public_net_id: fbe8fd92-6636-4e63-ab28-bb6a5b0888a9 diff --git a/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test.env b/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test.env index 3cd226113..63d2f671a 100644 --- a/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test.env +++ b/deployment/heat/onap-oom/env/tlab/ETE-OOM-Test.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 192.168.31.204:3142 docker_proxy: 192.168.31.204:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m2.xxlarge public_net_id: fbe8fd92-6636-4e63-ab28-bb6a5b0888a9 diff --git a/deployment/heat/onap-oom/env/tlab/EXTONAP_DEV.env b/deployment/heat/onap-oom/env/tlab/EXTONAP_DEV.env index 2d360eaca..cb9244299 100644 --- a/deployment/heat/onap-oom/env/tlab/EXTONAP_DEV.env +++ b/deployment/heat/onap-oom/env/tlab/EXTONAP_DEV.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 192.168.31.204:3142 docker_proxy: 192.168.31.204:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m2.xxlarge public_net_id: fbe8fd92-6636-4e63-ab28-bb6a5b0888a9 diff --git a/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env b/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env index 846d77b6e..22a5bdeb2 100644 --- a/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env +++ b/deployment/heat/onap-oom/env/windriver/Integration-Jenkins.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 10.12.5.2:3142 docker_proxy: 10.12.5.2:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m1.xxlarge public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-03.env b/deployment/heat/onap-oom/env/windriver/Integration-SB-03.env index 98c6c5f25..350bd475a 100644 --- a/deployment/heat/onap-oom/env/windriver/Integration-SB-03.env +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-03.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 10.12.5.2:3142 docker_proxy: 10.12.5.2:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m1.xxlarge public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-04.env b/deployment/heat/onap-oom/env/windriver/Integration-SB-04.env index ea7aa7ddb..4e6e1cdfd 100644 --- a/deployment/heat/onap-oom/env/windriver/Integration-SB-04.env +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-04.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 10.12.5.2:3142 docker_proxy: 10.12.5.2:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m1.xxlarge public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-05.env b/deployment/heat/onap-oom/env/windriver/Integration-SB-05.env index 5369182b4..47147ed3a 100644 --- a/deployment/heat/onap-oom/env/windriver/Integration-SB-05.env +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-05.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 10.12.5.2:3142 docker_proxy: 10.12.5.2:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m1.xxlarge public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-06.env b/deployment/heat/onap-oom/env/windriver/Integration-SB-06.env index 4203c79d8..6cf405386 100644 --- a/deployment/heat/onap-oom/env/windriver/Integration-SB-06.env +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-06.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 10.12.5.2:3142 docker_proxy: 10.12.5.2:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m1.xxlarge public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 diff --git a/deployment/heat/onap-oom/env/windriver/Integration-SB-07.env b/deployment/heat/onap-oom/env/windriver/Integration-SB-07.env index efefa3888..10b691e89 100644 --- a/deployment/heat/onap-oom/env/windriver/Integration-SB-07.env +++ b/deployment/heat/onap-oom/env/windriver/Integration-SB-07.env @@ -13,7 +13,7 @@ parameters: apt_proxy: 10.12.5.2:3142 docker_proxy: 10.12.5.2:5000 - rancher_vm_flavor: m1.small + rancher_vm_flavor: m1.large k8s_vm_flavor: m1.xxlarge public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4 diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh index 119e40a04..d483e73df 100644 --- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh +++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh @@ -19,7 +19,7 @@ Acquire::https::Proxy "DIRECT"; EOF fi apt-get -y update -apt-get -y install linux-image-extra-$(uname -r) jq +apt-get -y install linux-image-extra-$(uname -r) jq make cd ~ @@ -34,13 +34,9 @@ sudo mv ./kubectl /usr/local/bin/kubectl mkdir ~/.kube # install helm -wget -q http://storage.googleapis.com/kubernetes-helm/helm-v2.6.1-linux-amd64.tar.gz -tar -zxvf helm-v2.6.1-linux-amd64.tar.gz +wget -q http://storage.googleapis.com/kubernetes-helm/helm-v2.7.2-linux-amd64.tar.gz +tar -zxvf helm-v2.7.2-linux-amd64.tar.gz sudo mv linux-amd64/helm /usr/local/bin/helm -# verify version -helm version -# Rancher 1.6.14 installs 2.6.1 - if you upgrade to 2.8.0 - you will need to upgrade helm on the server to the version to level of client -helm init --upgrade # Fix virtual memory allocation for onap-log:elasticsearch: echo "vm.max_map_count=262144" >> /etc/sysctl.conf @@ -88,18 +84,6 @@ done RANCHER_AGENT_CMD=$(jq -r .command token.json) eval $RANCHER_AGENT_CMD -# download rancher CLI -wget -q https://github.com/rancher/cli/releases/download/v0.6.7/rancher-linux-amd64-v0.6.7.tar.xz -unxz rancher-linux-amd64-v0.6.7.tar.xz -tar xvf rancher-linux-amd64-v0.6.7.tar - -# Clone OOM: -cd ~ -git clone -b master http://gerrit.onap.org/r/oom - -# Update values.yaml to point to docker-proxy instead of nexus3: -cd ~/oom/kubernetes -perl -p -i -e 's/nexus3.onap.org:10001/__docker_proxy__/g' `find ./ -name values.yaml` oneclick/setenv.bash KUBETOKEN=$(echo -n 'Basic '$(echo -n "$RANCHER_ACCESS_KEY:$RANCHER_SECRET_KEY" | base64 -w 0) | base64 -w 0) @@ -128,53 +112,32 @@ EOF export KUBECONFIG=/root/.kube/config kubectl config view -# Update ~/oom/kubernetes/kube2msb/values.yaml kubeMasterAuthToken to use the token from ~/.kube/config -sed -i "s/kubeMasterAuthToken:.*/kubeMasterAuthToken: $KUBETOKEN/" ~/oom/kubernetes/kube2msb/values.yaml - -# Put your onap_key ssh private key in ~/.ssh/onap_key - -# Create or edit ~/oom/kubernetes/config/onap-parameters.yaml -cat > ~/oom/kubernetes/config/onap-parameters.yaml <<EOF -OPENSTACK_UBUNTU_14_IMAGE: "__ubuntu_1404_image__" -OPENSTACK_PUBLIC_NET_ID: "__public_net_id__" -OPENSTACK_OAM_NETWORK_ID: "__oam_network_id__" -OPENSTACK_OAM_SUBNET_ID: "__oam_subnet_id__" -OPENSTACK_OAM_NETWORK_CIDR: "__oam_network_cidr__" -OPENSTACK_USERNAME: "__openstack_username__" -OPENSTACK_API_KEY: "__openstack_api_key__" -OPENSTACK_TENANT_NAME: "__openstack_tenant_name__" -OPENSTACK_TENANT_ID: "__openstack_tenant_id__" -OPENSTACK_REGION: "RegionOne" -OPENSTACK_KEYSTONE_URL: "__keystone_url__" -OPENSTACK_FLAVOUR_MEDIUM: "m1.medium" -OPENSTACK_SERVICE_TENANT_NAME: "service" -DMAAP_TOPIC: "AUTO" -DEMO_ARTIFACTS_VERSION: "1.1.1" -EOF -cat ~/oom/kubernetes/config/onap-parameters.yaml - - # wait for kubernetes to initialze sleep 100 until [ $(kubectl get pods --namespace kube-system | tail -n +2 | grep -c Running) -ge 6 ]; do sleep 10 done -# Source the environment file: -cd ~/oom/kubernetes/oneclick/ -source setenv.bash -# run the config pod creation -cd ~/oom/kubernetes/config -./createConfig.sh -n onap +# Install using OOM +export HOME=/root -# Wait until the config container completes. -sleep 20 -until [ $(kubectl get pods --namespace onap -a | tail -n +2 | grep -c Completed) -eq 1 ]; do - sleep 10 -done +# Clone OOM: +cd ~ +git clone -b master http://gerrit.onap.org/r/oom +git log -1 -# version control the config to see what's happening +# Update values.yaml to point to docker-proxy instead of nexus3: +cd ~/oom/kubernetes +#perl -p -i -e 's/nexus3.onap.org:10001/__docker_proxy__/g' `find ./ -name values.yaml` +sed -i 's/nexus3.onap.org:10001/__docker_proxy__/g' onap/values.yaml +sed -i 's/#repository:/repository:/g' onap/values.yaml +sed -i 's/#repositorySecret:/repositorySecret:/g' onap/values.yaml +git diff + + +# version control the persistence volume to see what's happening +mkdir -p /dockerdata-nfs/ cd /dockerdata-nfs/ git init git config user.email "root@k8s" @@ -183,8 +146,18 @@ git add -A git commit -m "initial commit" # Run ONAP: -cd ~/oom/kubernetes/oneclick/ -./createAll.bash -n onap +cd ~/oom/kubernetes/ +# verify version +helm version +helm init --client-only +helm init --upgrade +helm serve & +sleep 3 +helm repo add local http://127.0.0.1:8879 +helm repo list +make all +helm search -l | grep local +helm install local/onap -n dev --namespace onap # Check ONAP status: sleep 3 diff --git a/deployment/heat/onap-oom/scripts/deploy.sh b/deployment/heat/onap-oom/scripts/deploy.sh index 60ceab663..c81e65c8b 100755 --- a/deployment/heat/onap-oom/scripts/deploy.sh +++ b/deployment/heat/onap-oom/scripts/deploy.sh @@ -45,6 +45,7 @@ for n in $(seq 1 10); do fi sleep 15m done -LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key ubuntu@$K8S_IP "ls -1t /dockerdata-nfs/onap/robot/eteshare/logs | head -1") -rsync -e "ssh -i ~/.ssh/onap_key" -avPz ubuntu@$K8S_IP:/dockerdata-nfs/onap/robot/eteshare/logs/${LOG_DIR}/ $WORKSPACE/archives/ +ROBOT_POD=$(ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key ubuntu@$K8S_IP 'sudo su -c "kubectl --namespace onap get pods"' | grep robot | sed 's/ .*//') +LOG_DIR=$(ssh -o StrictHostKeychecking=no -i ~/.ssh/onap_key ubuntu@$K8S_IP "sudo su -c \"kubectl exec $ROBOT_POD --namespace onap -- ls -1t /share/logs | head -1\"") +wget --user=robot --password=robot -r -np -nH --cut-dirs=2 -R "index.html*" -P $WORKSPACE/archives/ http://$K8S_IP:30209/logs/$LOG_DIR/ exit 0 |