X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=boot%2Fnbi_install.sh;h=35e42ac4a585c92be54798a367ff9041f059f9ea;hb=refs%2Fheads%2Fbeijing;hp=71546016b36f7c3256b934dbdb7af0fae8e0d911;hpb=6429a03bbf50b7844f53e1549770571e22193af7;p=demo.git diff --git a/boot/nbi_install.sh b/boot/nbi_install.sh index 71546016..35e42ac4 100644 --- a/boot/nbi_install.sh +++ b/boot/nbi_install.sh @@ -1,7 +1,6 @@ #!/bin/bash # Read configuration files -NEXUS_REPO=$(cat /opt/config/nexus_repo.txt) ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt) DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) @@ -47,25 +46,25 @@ then ifup eth1 fi -# Download dependencies -echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list -echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list apt-get update -apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates curl git ntp ntpdate make software-properties-common # Download scripts from Nexus -curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/nbi_vm_init.sh -o /opt/nbi_vm_init.sh -curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/nbi_serv.sh -o /opt/nbi_serv.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip nbi_vm_init.sh > /opt/nbi_vm_init.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip nbi_serv.sh > /opt/nbi_serv.sh chmod +x /opt/nbi_vm_init.sh chmod +x /opt/nbi_serv.sh mv /opt/nbi_serv.sh /etc/init.d update-rc.d nbi_serv.sh defaults # Download and install docker-engine and docker-compose -echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list +curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - +add-apt-repository \ + "deb [arch=amd64] https://download.docker.com/linux/ubuntu \ + $(lsb_release -cs) \ + stable" apt-get update -apt-get install -y linux-image-extra-$(uname -r) linux-image-extra-virtual -apt-get install -y --allow-unauthenticated docker-engine +apt-get install -y docker-ce 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