nexus_password:
type: string
description: Nexus Repository Password
-
- gitlab_username:
- type: string
- description: Gitlab Repository username
-
- gitlab_password:
- type: string
- description: Gitlab Repository Password
artifacts_version:
type: string
__nexus_docker_repo__: { get_param: nexus_docker_repo }
__nexus_username__: { get_param: nexus_username }
__nexus_password__: { get_param: nexus_password }
- __gitlab_username__: { get_param: gitlab_username }
- __gitlab_password__: { get_param: gitlab_password }
__dmaap_topic__: { get_param: dmaap_topic }
__artifacts_version__: { get_param: artifacts_version }
__dns_ip_addr__: { get_param: dns_ip_addr }
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get update
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_vm_init.sh -o /opt/aai_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/aai_serv.sh -o /opt/aai_serv.sh
chmod +x /opt/aai_vm_init.sh
update-rc.d aai_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
mkdir /opt/docker
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
chmod +x /opt/docker/docker-compose
-
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
- echo "__gitlab_username__" > /opt/config/gitlab_username.txt
- echo "__gitlab_password__" > /opt/config/gitlab_password.txt
- echo "gerrit.onap.org" > /opt/config/gitlab_certname.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
# DNS/GW IP address configuration
echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__openstack_username__" > /opt/config/openstack_username.txt
+ echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
+ echo "__keystone_url__" > /opt/config/keystone.txt
+ echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_vm_init.sh -o /opt/mso_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mso_serv.sh -o /opt/mso_serv.sh
chmod +x /opt/mso_vm_init.sh
update-rc.d mso_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
chmod +x /opt/docker/docker-compose
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__openstack_username__" > /opt/config/openstack_username.txt
- echo "__openstack_tenant_id__" > /opt/config/tenant_id.txt
- echo "__keystone_url__" > /opt/config/keystone.txt
- echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
-
# Clone Gerrit repository
cd /opt
git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/mso/docker-config.git test_lab
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_vm_init.sh -o /opt/mr_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/mr_serv.sh -o /opt/mr_serv.sh
chmod +x /opt/mr_vm_init.sh
update-rc.d mr_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
chmod +x /opt/docker/docker-compose
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
-
# Clone Gerrit repository
cd /opt
git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/dcae/demo/startup/message-router.git dcae-startup-vm-message-router
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_repo__" > /opt/config/nexus_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__network_name__" > /opt/config/network.txt
+ echo "__openstack_username__" > /opt/config/openstack_username.txt
+ echo "__openstack_api_key__" > /opt/config/openstack_password.txt
+ echo "__openstack_region__" > /opt/config/region.txt
+ echo "__artifacts_version__" > /opt/config/artifacts_version.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
echo "APT::Periodic::Unattended-Upgrade \"0\";" >> /etc/apt/apt.conf.d/10periodic
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_vm_init.sh -o /opt/robot_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/robot_serv.sh -o /opt/robot_serv.sh
chmod +x /opt/robot_vm_init.sh
update-rc.d robot_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
mkdir /opt/docker
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
- chmod +x /opt/docker/docker-compose
-
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_repo__" > /opt/config/nexus_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__network_name__" > /opt/config/network.txt
- echo "__openstack_username__" > /opt/config/openstack_username.txt
- echo "__openstack_api_key__" > /opt/config/openstack_password.txt
- echo "__openstack_region__" > /opt/config/region.txt
- echo "__artifacts_version__" > /opt/config/artifacts_version.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
+ chmod +x /opt/docker/docker-compose
# Execute RobotETE-specific instructions: create share folder to run as a docker volume
mkdir -p /opt/eteshare/logs
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_vm_init.sh -o /opt/vid_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/vid_serv.sh -o /opt/vid_serv.sh
chmod +x /opt/vid_vm_init.sh
update-rc.d vid_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
chmod +x /opt/docker/docker-compose
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
-
# Clone Gerrit repository
cd /opt
git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/vid.git
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_vm_init.sh -o /opt/sdnc_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/sdnc_serv.sh -o /opt/sdnc_serv.sh
chmod +x /opt/sdnc_vm_init.sh
update-rc.d sdnc_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
mkdir /opt/docker
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
chmod +x /opt/docker/docker-compose
-
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
# Clone Gerrit repository
cd /opt
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__env_name__" > /opt/config/env_name.txt
+ echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
+ echo "__public_ip__" > /opt/config/public_ip.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_vm_init.sh -o /opt/asdc_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/asdc_serv.sh -o /opt/asdc_serv.sh
chmod +x /opt/asdc_vm_init.sh
update-rc.d asdc_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
mount /dev/vdb1 /data
echo "/dev/vdb1 /data ext4 errors=remount-ro,noatime,barrier=0 0 1" >> /etc/fstab
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__env_name__" > /opt/config/env_name.txt
- echo "__mr_ip_addr__" > /opt/config/mr_ip_addr.txt
- echo "__public_ip__" > /opt/config/public_ip.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
-
# Run SDC-specific instructions
cd /opt
mkdir -p /data/environments
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__public_ip__" > /opt/config/public_ip.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
+
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get update
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git unzip mysql-client-core-5.6 ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_vm_init.sh -o /opt/portal_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/portal_serv.sh -o /opt/portal_serv.sh
chmod +x /opt/portal_vm_init.sh
update-rc.d portal_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
chmod +x /opt/docker/docker-compose
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__public_ip__" > /opt/config/public_ip.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
-
# Clone Gerrit repository
mkdir -p /PROJECT/OpenSource/UbuntuEP/logs
cd /opt
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk make git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_vm_init.sh -o /opt/dcae_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/dcae_serv.sh -o /opt/dcae_serv.sh
chmod +x /opt/dcae_vm_init.sh
update-rc.d dcae_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
GIT-MR-REPO: http://gerrit.onap.org/r/dcae/demo/startup/message-router.git
EOF_CONFIG
-
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__gitlab_branch__" > /opt/config/gitlab_branch.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
# DNS/GW IP address configuration
echo "nameserver __dns_ip_addr__" >> /etc/resolvconf/resolv.conf.d/head
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__public_ip__" > /opt/config/public_ip.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_vm_init.sh -o /opt/policy_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/policy_serv.sh -o /opt/policy_serv.sh
chmod +x /opt/policy_vm_init.sh
update-rc.d policy_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
chmod +x /opt/docker/docker-compose
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__public_ip__" > /opt/config/public_ip.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
-
# Clone Gerrit repository
cd /opt
git clone -b __gerrit_branch__ --single-branch http://gerrit.onap.org/r/policy/docker.git policy
hn=`hostname`
echo 127.0.0.1 $hn >> /etc/hosts
+
+ # Create configuration files
+ mkdir -p /opt/config
+ echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
+ echo "__nexus_username__" > /opt/config/nexus_username.txt
+ echo "__nexus_password__" > /opt/config/nexus_password.txt
+ echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
+ echo "__docker_version__" > /opt/config/docker_version.txt
# Download dependencies
add-apt-repository -y ppa:openjdk-r/ppa
apt-get install -y apt-transport-https ca-certificates wget openjdk-7-jdk git ntp ntpdate
# Download scripts from Nexus
+ curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/docker_key.txt -o /opt/config/docker_key.txt
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_vm_init.sh -o /opt/appc_vm_init.sh
curl -k __nexus_repo__/org.openecomp.demo/boot/__artifacts_version__/appc_serv.sh -o /opt/appc_serv.sh
chmod +x /opt/appc_vm_init.sh
update-rc.d appc_serv.sh defaults
# Download and install docker-engine and docker-compose
- apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
+ DOCKER_KEY=$(cat /opt/config/docker_key.txt)
+ apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-keys $DOCKER_KEY
echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list
apt-get update
apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual
mkdir /opt/docker
curl -L https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m` > /opt/docker/docker-compose
chmod +x /opt/docker/docker-compose
-
- # Store credentials in files
- mkdir -p /opt/config
- echo "__nexus_docker_repo__" > /opt/config/nexus_docker_repo.txt
- echo "__nexus_username__" > /opt/config/nexus_username.txt
- echo "__nexus_password__" > /opt/config/nexus_password.txt
- echo "__dmaap_topic__" > /opt/config/dmaap_topic.txt
- echo "__docker_version__" > /opt/config/docker_version.txt
# Clone Gerrit repository
cd /opt