aboutsummaryrefslogtreecommitdiffstats
path: root/deployment/heat/onap-oom
diff options
context:
space:
mode:
Diffstat (limited to 'deployment/heat/onap-oom')
-rw-r--r--deployment/heat/onap-oom/env/gwu/onap-heat-openrc9
-rw-r--r--deployment/heat/onap-oom/env/gwu/onap-oom-openrc9
-rw-r--r--deployment/heat/onap-oom/env/gwu/onap-oom.env50
-rw-r--r--deployment/heat/onap-oom/env/huawei/onap-heat-openrc9
-rw-r--r--deployment/heat/onap-oom/env/huawei/onap-oom-openrc9
-rw-r--r--deployment/heat/onap-oom/env/huawei/onap-oom.env50
-rw-r--r--deployment/heat/onap-oom/env/tlab/onap-oom.env19
-rw-r--r--deployment/heat/onap-oom/env/windriver/onap-oom.env19
-rw-r--r--deployment/heat/onap-oom/k8s_vm_entrypoint.sh4
-rw-r--r--deployment/heat/onap-oom/onap-oom.yaml80
-rw-r--r--deployment/heat/onap-oom/rancher_vm_entrypoint.sh26
-rwxr-xr-x[-rw-r--r--]deployment/heat/onap-oom/scripts/cleanup.sh2
-rwxr-xr-xdeployment/heat/onap-oom/scripts/deploy.sh40
-rwxr-xr-xdeployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh2
-rwxr-xr-xdeployment/heat/onap-oom/scripts/redeploy.sh106
15 files changed, 188 insertions, 246 deletions
diff --git a/deployment/heat/onap-oom/env/gwu/onap-heat-openrc b/deployment/heat/onap-oom/env/gwu/onap-heat-openrc
deleted file mode 100644
index fcad4db01..000000000
--- a/deployment/heat/onap-oom/env/gwu/onap-heat-openrc
+++ /dev/null
@@ -1,9 +0,0 @@
-export OS_PROJECT_DOMAIN_NAME=Default
-export OS_USER_DOMAIN_NAME=Default
-export OS_PROJECT_ID=675ca78806b7485e9c96bd70cd5734ac
-export OS_PROJECT_NAME=onap-heat
-export OS_USERNAME=demo
-#export OS_PASSWORD=demo
-export OS_AUTH_URL=http://controller:5000/v3
-export OS_IDENTITY_API_VERSION=3
-export OS_IMAGE_API_VERSION=2
diff --git a/deployment/heat/onap-oom/env/gwu/onap-oom-openrc b/deployment/heat/onap-oom/env/gwu/onap-oom-openrc
deleted file mode 100644
index 63e53117c..000000000
--- a/deployment/heat/onap-oom/env/gwu/onap-oom-openrc
+++ /dev/null
@@ -1,9 +0,0 @@
-export OS_PROJECT_DOMAIN_NAME=Default
-export OS_USER_DOMAIN_NAME=Default
-export OS_PROJECT_ID=e6507947d42646ea8045bcf2956b753a
-export OS_PROJECT_NAME=onap-oom
-export OS_USERNAME=demo
-#export OS_PASSWORD=demo
-export OS_AUTH_URL=http://controller:5000/v3
-export OS_IDENTITY_API_VERSION=3
-export OS_IMAGE_API_VERSION=2
diff --git a/deployment/heat/onap-oom/env/gwu/onap-oom.env b/deployment/heat/onap-oom/env/gwu/onap-oom.env
deleted file mode 100644
index e0c57f738..000000000
--- a/deployment/heat/onap-oom/env/gwu/onap-oom.env
+++ /dev/null
@@ -1,50 +0,0 @@
-parameters:
-
- ubuntu_1604_image: xenial
-
- apt_proxy: 192.168.1.51:3142
- docker_proxy: 192.168.2.18:5000
-
- rancher_vm_flavor: c1.xlarge
- k8s_vm_flavor: c1.xlarge
-
- public_net_id: c3352d4c-8452-4172-b09c-15f017673708
- key_name: onap-key
-
- oam_network_cidr: 10.0.0.0/16
-
- integration_override_yaml: >
- global:
- repository: __docker_proxy__
- pullPolicy: IfNotPresent
- robot:
- openStackKeyStoneUrl: "http://192.168.1.11:5000"
- openStackPublicNetId: "__public_net_id__"
- openStackTenantId: "${OS_PROJECT_ID}"
- openStackUserName: "${OS_USERNAME}"
- ubuntu14Image: "trusty"
- ubuntu16Image: "xenial"
- openStackPrivateNetId: "__oam_network_id__"
- openStackPrivateSubnetId: "__oam_subnet_id__"
- openStackPrivateNetCidr: "__oam_network_cidr__"
- openStackOamNetworkCidrPrefix: "10.0"
- dcaeCollectorIp: "__k8s_1_vm_ip__"
- vnfPubKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
- demoArtifactsVersion: "1.2.2"
- scriptVersion: "1.2.1"
- rancherIpAddress: "__rancher_ip_addr__"
- config:
- openStackEncryptedPasswordHere: "${OS_PASSWORD_ENCRYPTED}"
- so:
- config:
- openStackUserName: "${OS_USERNAME}"
- openStackKeyStoneUrl: "http://192.168.1.11:5000"
- openStackEncryptedPasswordHere: "${OS_PASSWORD_ENCRYPTED}"
- appc:
- replicaCount: 1
- config:
- enableClustering: false
- sdnc:
- replicaCount: 3
- config:
- enableClustering: true
diff --git a/deployment/heat/onap-oom/env/huawei/onap-heat-openrc b/deployment/heat/onap-oom/env/huawei/onap-heat-openrc
deleted file mode 100644
index 301aeeed5..000000000
--- a/deployment/heat/onap-oom/env/huawei/onap-heat-openrc
+++ /dev/null
@@ -1,9 +0,0 @@
-export OS_PROJECT_DOMAIN_NAME=Default
-export OS_USER_DOMAIN_NAME=Default
-export OS_PROJECT_ID=66a48e4b0a934463bef0bd694f93147a
-export OS_PROJECT_NAME=onap-heat
-export OS_USERNAME=demo
-#export OS_PASSWORD=demo
-export OS_AUTH_URL=http://controller.neo.futurewei.com:5000/v3
-export OS_IDENTITY_API_VERSION=3
-export OS_IMAGE_API_VERSION=2
diff --git a/deployment/heat/onap-oom/env/huawei/onap-oom-openrc b/deployment/heat/onap-oom/env/huawei/onap-oom-openrc
deleted file mode 100644
index cdafe23c3..000000000
--- a/deployment/heat/onap-oom/env/huawei/onap-oom-openrc
+++ /dev/null
@@ -1,9 +0,0 @@
-export OS_PROJECT_DOMAIN_NAME=Default
-export OS_USER_DOMAIN_NAME=Default
-export OS_PROJECT_ID=13159ba149fa47ea9646902ce5734b89
-export OS_PROJECT_NAME=onap-oom
-export OS_USERNAME=demo
-#export OS_PASSWORD=demo
-export OS_AUTH_URL=http://controller.neo.futurewei.com:5000/v3
-export OS_IDENTITY_API_VERSION=3
-export OS_IMAGE_API_VERSION=2
diff --git a/deployment/heat/onap-oom/env/huawei/onap-oom.env b/deployment/heat/onap-oom/env/huawei/onap-oom.env
deleted file mode 100644
index c02d1a6c9..000000000
--- a/deployment/heat/onap-oom/env/huawei/onap-oom.env
+++ /dev/null
@@ -1,50 +0,0 @@
-parameters:
-
- ubuntu_1604_image: xenial
-
- apt_proxy: 10.145.122.117:8000
- docker_proxy: 10.145.123.23:5000
-
- rancher_vm_flavor: m1.xlarge
- k8s_vm_flavor: m1.xlarge
-
- public_net_id: 7baa99ac-43a0-4013-9dfb-bbb94fdcd91a
- key_name: onap-key
-
- oam_network_cidr: 10.0.0.0/16
-
- integration_override_yaml: >
- global:
- repository: __docker_proxy__
- pullPolicy: IfNotPresent
- robot:
- openStackKeyStoneUrl: "http://10.145.122.118:5000"
- openStackPublicNetId: "__public_net_id__"
- openStackTenantId: "${OS_PROJECT_ID}"
- openStackUserName: "${OS_USERNAME}"
- ubuntu14Image: "trusty"
- ubuntu16Image: "xenial"
- openStackPrivateNetId: "__oam_network_id__"
- openStackPrivateSubnetId: "__oam_subnet_id__"
- openStackPrivateNetCidr: "__oam_network_cidr__"
- openStackOamNetworkCidrPrefix: "10.0"
- dcaeCollectorIp: "__k8s_1_vm_ip__"
- vnfPubKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
- demoArtifactsVersion: "1.2.2"
- scriptVersion: "1.2.1"
- rancherIpAddress: "__rancher_ip_addr__"
- config:
- openStackEncryptedPasswordHere: "${OS_PASSWORD_ENCRYPTED}"
- so:
- config:
- openStackUserName: "${OS_USERNAME}"
- openStackKeyStoneUrl: "http://10.145.122.118:5000"
- openStackEncryptedPasswordHere: "${OS_PASSWORD_ENCRYPTED}"
- appc:
- replicaCount: 1
- config:
- enableClustering: false
- sdnc:
- replicaCount: 3
- config:
- enableClustering: true
diff --git a/deployment/heat/onap-oom/env/tlab/onap-oom.env b/deployment/heat/onap-oom/env/tlab/onap-oom.env
index 9680e7575..a871e3f10 100644
--- a/deployment/heat/onap-oom/env/tlab/onap-oom.env
+++ b/deployment/heat/onap-oom/env/tlab/onap-oom.env
@@ -7,8 +7,8 @@ parameters:
rancher_vm_flavor: m5.xlarge
k8s_vm_flavor: m4.xlarge
- etcd_vm_flavor: m1.medium
- orch_vm_flavor: m1.medium
+ etcd_vm_flavor: m1.large
+ orch_vm_flavor: m1.xlarge
public_net_id: fbe8fd92-6636-4e63-ab28-bb6a5b0888a9
@@ -19,6 +19,9 @@ parameters:
repository: __docker_proxy__
pullPolicy: IfNotPresent
robot:
+ flavor: large
+ appcUsername: "appc@appc.onap.org"
+ appcPassword: "demo123456!"
openStackKeyStoneUrl: "https://bdc1tlab01.research.att.com:5000"
openStackPublicNetId: "__oam_network_id__" # NOTE: for TLAB, openStackPublicNetId needs to be oam_network_id instead of public_net_id
openStackTenantId: "${OS_PROJECT_ID}"
@@ -31,8 +34,8 @@ parameters:
openStackOamNetworkCidrPrefix: "10.0"
dcaeCollectorIp: "__k8s_1_vm_ip__"
vnfPubKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
- demoArtifactsVersion: "1.2.2"
- scriptVersion: "1.2.1"
+ demoArtifactsVersion: "1.3.0-SNAPSHOT"
+ scriptVersion: "1.3.0-SNAPSHOT"
rancherIpAddress: "__rancher_ip_addr__"
config:
openStackEncryptedPasswordHere: "${OS_PASSWORD_ENCRYPTED}"
@@ -46,6 +49,14 @@ parameters:
replicaCount: 1
config:
enableClustering: false
+ enableAAF: true
+ openStackType: "OpenStackProvider"
+ openStackName: "OpenStack"
+ openStackKeyStoneUrl: "https://bdc1tlab01.research.att.com:5000/v2.0"
+ openStackServiceTenantName: "${OS_PROJECT_NAME}"
+ openStackDomain: "${OS_USER_DOMAIN_NAME}"
+ openStackUserName: "${OS_USERNAME}"
+ openStackEncryptedPassword: "${OS_PASSWORD}"
sdnc:
replicaCount: 1
config:
diff --git a/deployment/heat/onap-oom/env/windriver/onap-oom.env b/deployment/heat/onap-oom/env/windriver/onap-oom.env
index ce0f4fe83..dccfed8ce 100644
--- a/deployment/heat/onap-oom/env/windriver/onap-oom.env
+++ b/deployment/heat/onap-oom/env/windriver/onap-oom.env
@@ -7,8 +7,8 @@ parameters:
rancher_vm_flavor: m2.xlarge
k8s_vm_flavor: m1.xlarge
- etcd_vm_flavor: m1.medium
- orch_vm_flavor: m1.medium
+ etcd_vm_flavor: m1.large
+ orch_vm_flavor: m1.xlarge
public_net_id: 971040b2-7059-49dc-b220-4fab50cb2ad4
@@ -19,6 +19,9 @@ parameters:
repository: __docker_proxy__
pullPolicy: IfNotPresent
robot:
+ flavor: large
+ appcUsername: "appc@appc.onap.org"
+ appcPassword: "demo123456!"
openStackKeyStoneUrl: "http://10.12.25.2:5000"
openStackPublicNetId: "__public_net_id__"
openStackTenantId: "${OS_PROJECT_ID}"
@@ -32,8 +35,8 @@ parameters:
openStackOamNetworkCidrPrefix: "10.0"
dcaeCollectorIp: "__k8s_1_vm_ip__"
vnfPubKey: "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDKXDgoo3+WOqcUG8/5uUbk81+yczgwC4Y8ywTmuQqbNxlY1oQ0YxdMUqUnhitSXs5S/yRuAVOYHwGg2mCs20oAINrP+mxBI544AMIb9itPjCtgqtE2EWo6MmnFGbHB4Sx3XioE7F4VPsh7japsIwzOjbrQe+Mua1TGQ5d4nfEOQaaglXLLPFfuc7WbhbJbK6Q7rHqZfRcOwAMXgDoBqlyqKeiKwnumddo2RyNT8ljYmvB6buz7KnMinzo7qB0uktVT05FH9Rg0CTWH5norlG5qXgP2aukL0gk1ph8iAt7uYLf1ktp+LJI2gaF6L0/qli9EmVCSLr1uJ38Q8CBflhkh"
- demoArtifactsVersion: "1.2.2"
- scriptVersion: "1.2.1"
+ demoArtifactsVersion: "1.3.0-SNAPSHOT"
+ scriptVersion: "1.3.0-SNAPSHOT"
rancherIpAddress: "__rancher_ip_addr__"
config:
openStackEncryptedPasswordHere: "${OS_PASSWORD_ENCRYPTED}"
@@ -47,6 +50,14 @@ parameters:
replicaCount: 1
config:
enableClustering: false
+ enableAAF: true
+ openStackType: "OpenStackProvider"
+ openStackName: "OpenStack"
+ openStackKeyStoneUrl: "http://10.12.25.2:5000/v2.0"
+ openStackServiceTenantName: "${OS_PROJECT_NAME}"
+ openStackDomain: "${OS_USER_DOMAIN_NAME}"
+ openStackUserName: "${OS_USERNAME}"
+ openStackEncryptedPassword: "${OS_PASSWORD}"
sdnc:
replicaCount: 1
config:
diff --git a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
index b93eab3f8..e93622cb3 100644
--- a/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/k8s_vm_entrypoint.sh
@@ -10,14 +10,14 @@
#
export DEBIAN_FRONTEND=noninteractive
+HOST_IP=$(hostname -I)
+echo $HOST_IP `hostname` >> /etc/hosts
printenv
mkdir -p /opt/config
echo "__docker_version__" > /opt/config/docker_version.txt
echo "__rancher_ip_addr__" > /opt/config/rancher_ip_addr.txt
echo "__rancher_private_ip_addr__" > /opt/config/rancher_private_ip_addr.txt
-HOST_IP=$(hostname -I)
-echo $HOST_IP `hostname` >> /etc/hosts
mkdir -p /etc/docker
if [ ! -z "__docker_proxy__" ]; then
diff --git a/deployment/heat/onap-oom/onap-oom.yaml b/deployment/heat/onap-oom/onap-oom.yaml
index 61ed8a5f7..dc06512bb 100644
--- a/deployment/heat/onap-oom/onap-oom.yaml
+++ b/deployment/heat/onap-oom/onap-oom.yaml
@@ -219,7 +219,6 @@ resources:
get_attr: [k8s_8_floating_ip, floating_ip_address],
get_attr: [k8s_9_floating_ip, floating_ip_address],
get_attr: [k8s_10_floating_ip, floating_ip_address],
- get_attr: [k8s_11_floating_ip, floating_ip_address],
]
__k8s_private_ips__: [
get_attr: [k8s_1_floating_ip, fixed_ip_address],
@@ -232,7 +231,6 @@ resources:
get_attr: [k8s_8_floating_ip, fixed_ip_address],
get_attr: [k8s_9_floating_ip, fixed_ip_address],
get_attr: [k8s_10_floating_ip, fixed_ip_address],
- get_attr: [k8s_11_floating_ip, fixed_ip_address],
]
k8s_1_private_port:
type: OS::Neutron::Port
@@ -604,43 +602,6 @@ resources:
template:
get_file: k8s_vm_entrypoint.sh
- k8s_11_private_port:
- type: OS::Neutron::Port
- properties:
- network: { get_resource: oam_network }
- fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
- security_groups:
- - { get_resource: onap_sg }
-
- k8s_11_floating_ip:
- type: OS::Neutron::FloatingIP
- properties:
- floating_network_id: { get_param: public_net_id }
- port_id: { get_resource: k8s_11_private_port }
-
- k8s_11_vm:
- type: OS::Nova::Server
- properties:
- name:
- list_join: ['-', [ { get_param: 'OS::stack_name' }, 'k8s', '11' ] ]
- image: { get_param: ubuntu_1604_image }
- flavor: { get_param: k8s_vm_flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: k8s_11_private_port }
- user_data_format: RAW
- user_data:
- str_replace:
- params:
- __docker_proxy__: { get_param: docker_proxy }
- __apt_proxy__: { get_param: apt_proxy }
- __docker_version__: { get_param: docker_version }
- __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
- __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
- __host_label__: 'compute'
- template:
- get_file: k8s_vm_entrypoint.sh
-
etcd_1_private_port:
type: OS::Neutron::Port
properties:
@@ -789,43 +750,6 @@ resources:
template:
get_file: k8s_vm_entrypoint.sh
- orch_2_private_port:
- type: OS::Neutron::Port
- properties:
- network: { get_resource: oam_network }
- fixed_ips: [{"subnet": { get_resource: oam_subnet }}]
- security_groups:
- - { get_resource: onap_sg }
-
- orch_2_floating_ip:
- type: OS::Neutron::FloatingIP
- properties:
- floating_network_id: { get_param: public_net_id }
- port_id: { get_resource: orch_2_private_port }
-
- orch_2_vm:
- type: OS::Nova::Server
- properties:
- name:
- list_join: ['-', [ { get_param: 'OS::stack_name' }, 'orch', '2' ] ]
- image: { get_param: ubuntu_1604_image }
- flavor: { get_param: orch_vm_flavor }
- key_name: { get_param: key_name }
- networks:
- - port: { get_resource: orch_2_private_port }
- user_data_format: RAW
- user_data:
- str_replace:
- params:
- __docker_proxy__: { get_param: docker_proxy }
- __apt_proxy__: { get_param: apt_proxy }
- __docker_version__: { get_param: docker_version }
- __rancher_ip_addr__: { get_attr: [rancher_floating_ip, floating_ip_address] }
- __rancher_private_ip_addr__: { get_attr: [rancher_floating_ip, fixed_ip_address] }
- __host_label__: 'orchestration'
- template:
- get_file: k8s_vm_entrypoint.sh
-
outputs:
rancher_vm_ip:
description: The IP address of the rancher instance
@@ -871,7 +795,3 @@ outputs:
description: The IP address of the k8s_10 instance
value: { get_attr: [k8s_10_floating_ip, floating_ip_address] }
- k8s_11_vm_ip:
- description: The IP address of the k8s_11 instance
- value: { get_attr: [k8s_11_floating_ip, floating_ip_address] }
-
diff --git a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
index 3bc811b8f..aadc81628 100644
--- a/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
+++ b/deployment/heat/onap-oom/rancher_vm_entrypoint.sh
@@ -10,6 +10,8 @@
#
export DEBIAN_FRONTEND=noninteractive
+HOST_IP=$(hostname -I)
+echo $HOST_IP `hostname` >> /etc/hosts
printenv
mkdir -p /opt/config
@@ -114,10 +116,15 @@ sudo mv ./kubectl /usr/local/bin/kubectl
mkdir ~/.kube
# install helm __helm_version__
+mkdir -p helm
+pushd helm
wget -q http://storage.googleapis.com/kubernetes-helm/helm-v__helm_version__-linux-amd64.tar.gz
tar -zxvf helm-v__helm_version__-linux-amd64.tar.gz
-sudo mv linux-amd64/helm /usr/local/bin/helm
+sudo cp linux-amd64/helm /usr/local/bin/helm
+popd
+mkdir -p rancher
+pushd rancher
echo export RANCHER_IP=__rancher_private_ip_addr__ > api-keys-rc
source api-keys-rc
@@ -178,14 +185,26 @@ done
jq -r .command token.json > rancher_agent_cmd.sh
chmod +x rancher_agent_cmd.sh
cp rancher_agent_cmd.sh /dockerdata-nfs
+popd
+
cd /dockerdata-nfs
git add -A
git commit -a -m "Add rancher agent command file"
cd ~
+# Uncomment this section to run orchestration plane on the Rancher VM
+#
+# cp /dockerdata-nfs/rancher_agent_cmd.sh .
+# sed -i "s/docker run/docker run -e CATTLE_HOST_LABELS='orchestration=true' -e CATTLE_AGENT_IP=${HOST_IP}/g" rancher_agent_cmd.sh
+# source rancher_agent_cmd.sh
+
+
+
KUBETOKEN=$(echo -n 'Basic '$(echo -n "$CATTLE_ACCESS_KEY:$CATTLE_SECRET_KEY" | base64 -w 0) | base64 -w 0)
+NAMESPACE=onap
+
# create .kube/config
cat > ~/.kube/config <<EOF
apiVersion: v1
@@ -199,6 +218,7 @@ clusters:
contexts:
- context:
cluster: "oom"
+ namespace: "$NAMESPACE"
user: "oom"
name: "oom"
current-context: "oom"
@@ -211,6 +231,8 @@ EOF
export KUBECONFIG=/root/.kube/config
kubectl config view
+
+
# Enable auto-completion for kubectl
echo "source <(kubectl completion bash)" >> ~/.bashrc
@@ -272,7 +294,7 @@ helm repo list
make all
rsync -avt ~/oom/kubernetes/helm/plugins ~/.helm/
helm search -l | grep local
-helm deploy dev local/onap -f ~/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f ~/integration-override.yaml --namespace onap | tee ~/helm-deploy.log
+helm deploy dev local/onap -f ~/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f ~/integration-override.yaml --namespace $NAMESPACE
helm list
diff --git a/deployment/heat/onap-oom/scripts/cleanup.sh b/deployment/heat/onap-oom/scripts/cleanup.sh
index 4c84e3566..7c2a1e29f 100644..100755
--- a/deployment/heat/onap-oom/scripts/cleanup.sh
+++ b/deployment/heat/onap-oom/scripts/cleanup.sh
@@ -15,7 +15,7 @@ if [ $COMPONENT == "dcae" ] || [ $COMPONENT == "DCAE" ]; then
kubectl delete service consul -n onap
fi
-for op in secrets configmaps pvc pv services deployments statefulsets; do
+for op in secrets configmaps pvc pv services deployments statefulsets clusterrolebinding; do
ARRAY=(`kubectl get $op -n onap | grep dev-$COMPONENT | awk '{print $1}'`)
for i in ${ARRAY[*]}; do
kubectl delete $op -n onap $i
diff --git a/deployment/heat/onap-oom/scripts/deploy.sh b/deployment/heat/onap-oom/scripts/deploy.sh
index 459af34bc..c3a73c763 100755
--- a/deployment/heat/onap-oom/scripts/deploy.sh
+++ b/deployment/heat/onap-oom/scripts/deploy.sh
@@ -156,28 +156,36 @@ ssh-keygen -R $RANCHER_IP
sleep 2m
ssh -o StrictHostKeychecking=no -i $SSH_KEY ubuntu@$RANCHER_IP "sed -u '/Cloud-init.*finished/q' <(tail -n+0 -f /var/log/cloud-init-output.log)"
-for n in $(seq 1 8); do
- echo "Wait count $n of 8"
- sleep 15m
- ssh -i $SSH_KEY ubuntu@$RANCHER_IP 'sudo su -l root -c "/root/oom/kubernetes/robot/ete-k8s.sh onap health"'
- RESULT=$?
- if [ $RESULT -eq 0 ]; then
- break
- fi
+PREV_RESULT=0
+for n in $(seq 1 20); do
+ RESULT=$(ssh -i $SSH_KEY ubuntu@$RANCHER_IP 'sudo su -c "kubectl -n onap get pods"' | grep -vE 'Running|Complete|NAME' | wc -l)
+ if [[ $? -eq 0 && ( $RESULT -eq 0 || $RESULT -eq $PREV_RESULT ) ]]; then
+ break
+ fi
+ sleep 15m
+ PREV_RESULT=$RESULT
+done
+
+PREV_RESULT=0
+for n in $(seq 1 20); do
+ echo "Wait for HEALTHCHECK count $n of 10"
+ ROBOT_POD=$(ssh -i $SSH_KEY ubuntu@$RANCHER_IP 'sudo su -c "kubectl --namespace onap get pods"' | grep robot | sed 's/ .*//')
+ ssh -i $SSH_KEY ubuntu@$RANCHER_IP 'sudo su -l root -c "/root/oom/kubernetes/robot/ete-k8s.sh onap health"'
+ RESULT=$?
+ if [[ $RESULT -lt 10 && ( $RESULT -eq 0 || $RESULT -eq $PREV_RESULT ) ]]; then
+ break
+ fi
+ sleep 15m
+ PREV_RESULT=$RESULT
done
-ROBOT_POD=$(ssh -i $SSH_KEY ubuntu@$RANCHER_IP 'sudo su -c "kubectl --namespace onap get pods"' | grep robot | sed 's/ .*//')
if [ "$ROBOT_POD" == "" ]; then
- exit 1
+ exit 1
fi
LOG_DIR=$(echo "kubectl exec -n onap $ROBOT_POD -- ls -1t /share/logs | grep health | head -1" | ssh -i $SSH_KEY ubuntu@$RANCHER_IP sudo su)
-if [ "$LOG_DIR" == "" ]; then
- exit 1
-fi
-
echo "kubectl cp -n onap $ROBOT_POD:share/logs/$LOG_DIR /tmp/robot/logs/$LOG_DIR" | ssh -i $SSH_KEY ubuntu@$RANCHER_IP sudo su
-rsync -e "ssh -i $SSH_KEY" -avtz ubuntu@$RANCHER_IP:/tmp/robot/logs/$LOG_DIR/ $WORKSPACE/archives/
-
echo "Browse Robot results at http://$K8S_IP:30209/logs/$LOG_DIR/"
+mkdir -p $WORKSPACE/archives/healthcheck
+rsync -e "ssh -i $SSH_KEY" -avtz ubuntu@$RANCHER_IP:/tmp/robot/logs/$LOG_DIR/ $WORKSPACE/archives/healthcheck
exit 0
diff --git a/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh b/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
index 0afd48085..570011128 100755
--- a/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
+++ b/deployment/heat/onap-oom/scripts/gen-onap-oom-yaml.sh
@@ -101,7 +101,7 @@ for VM_NUM in $(seq 3); do
VM_TYPE=etcd HOST_LABEL=etcd VM_NUM=$VM_NUM envsubst < $PARTS_DIR/onap-oom-2.yaml
done
-for VM_NUM in $(seq 2); do
+for VM_NUM in $(seq 1); do
VM_TYPE=orch HOST_LABEL=orchestration VM_NUM=$VM_NUM envsubst < $PARTS_DIR/onap-oom-2.yaml
done
diff --git a/deployment/heat/onap-oom/scripts/redeploy.sh b/deployment/heat/onap-oom/scripts/redeploy.sh
new file mode 100755
index 000000000..1d46f025d
--- /dev/null
+++ b/deployment/heat/onap-oom/scripts/redeploy.sh
@@ -0,0 +1,106 @@
+#!/bin/bash -x
+#
+# Copyright 2018 Huawei Technologies Co., Ltd.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+
+# This is meant to be run from within the Rancher VM to completely
+# redeploy ONAP while reusing the existing k8s stack.
+#
+# This assumes that /root/integration-override.yaml is up-to-date.
+#
+# This script can also be used after a VM reboot, and will restart
+# helm server accordingly.
+
+export DEBIAN_FRONTEND=noninteractive
+
+usage() {
+ echo "Usage: $0 <namespace>" 1>&2;
+ echo "This will completely re-deploy ONAP, and delete and re-clone oom/ and integration/ directories."
+ exit 1;
+}
+
+if [ "$#" -ne 1 ]; then
+ usage
+fi
+
+
+NS=$1
+OOM_GERRIT_BRANCH=master
+OOM_GERRIT_REFSPEC=refs/heads/master
+INTEGRATION_GERRIT_BRANCH=master
+INTEGRATION_GERRIT_REFSPEC=refs/heads/master
+DOCKER_MANIFEST=""
+
+# Verify that k8s works
+if [ $(kubectl get pods --namespace kube-system | tail -n +2 | grep -c Running) -lt 6 ]; then
+ echo "[ERROR] Kubernetes is not healthy; aborting"
+ exit 1
+fi
+
+if [ ! -f /dockerdata-nfs/rancher_agent_cmd.sh ]; then
+ cp /root/rancher_agent_cmd.sh /dockerdata-nfs
+fi
+
+
+kubectl delete namespace $NS
+for op in secrets configmaps pvc pv services deployments statefulsets clusterrolebinding; do
+ kubectl delete $op -n $NS --all
+done
+helm undeploy dev --purge
+rm -rf /dockerdata-nfs/dev-*/
+
+
+# Clone OOM:
+cd ~
+rm -rf oom/
+git clone -b $OOM_GERRIT_BRANCH https://gerrit.onap.org/r/oom
+cd oom
+git fetch https://gerrit.onap.org/r/oom $OOM_GERRIT_REFSPEC
+git checkout FETCH_HEAD
+git checkout -b workarounds
+git log -1
+
+# Clone integration
+cd ~
+rm -rf integration/
+git clone -b $INTEGRATION_GERRIT_BRANCH https://gerrit.onap.org/r/integration
+cd integration
+git fetch https://gerrit.onap.org/r/integration $INTEGRATION_GERRIT_REFSPEC
+git checkout FETCH_HEAD
+git checkout -b workarounds
+git log -1
+
+if [ ! -z "$DOCKER_MANIFEST" ]; then
+ cd version-manifest/src/main/scripts
+ ./update-oom-image-versions.sh ../resources/$DOCKER_MANIFEST ~/oom/
+fi
+
+cd ~/oom
+git diff
+git commit -a -m "apply manifest versions"
+git tag -a "deploy0" -m "initial deployment"
+
+
+# Run ONAP:
+cd ~/oom/kubernetes/
+
+if [ $(curl -s -o /dev/null -w "%{http_code}" 127.0.0.1:8879) -ne 200 ]; then
+ helm init --client-only
+ helm init --upgrade
+ helm serve &
+ sleep 10
+ helm repo add local http://127.0.0.1:8879
+ helm repo list
+fi
+make all
+rsync -avt ~/oom/kubernetes/helm/plugins ~/.helm/
+helm search -l | grep local
+helm deploy dev local/onap -f ~/oom/kubernetes/onap/resources/environments/public-cloud.yaml -f ~/integration-override.yaml --namespace onap | ts | tee -a ~/helm-deploy.log
+helm list
+