aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan-Simon Moeller <jsmoeller@linuxfoundation.org>2016-08-05 15:50:52 +0200
committerGerrit Code Review <gerrit@172.30.200.200>2016-09-01 15:42:16 +0000
commit6dd51f26945e936021e0f3c047790bf1ea4fe94f (patch)
tree1ba55f8999bb85919f06edcc4775a1f518de156b
parent715cac979c8152bb8bcca63df9e08a19633ede9e (diff)
Add deployment script.
This script is used to deploy the instance at jta.automotivelinux.org. We use some derivations (e.g. port 8082 and different folder for userdata). Change-Id: Ie85e7494945677ed970e571db1caa305e781339f Signed-off-by: Jan-Simon Moeller <jsmoeller@linuxfoundation.org>
-rwxr-xr-xdocs/scripts/agl-deploy-ci-instance.sh30
1 files changed, 30 insertions, 0 deletions
diff --git a/docs/scripts/agl-deploy-ci-instance.sh b/docs/scripts/agl-deploy-ci-instance.sh
new file mode 100755
index 0000000..e1e8dbe
--- /dev/null
+++ b/docs/scripts/agl-deploy-ci-instance.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+# (C) Jan-Simon Moeller (dl9pf@gmx.de)
+# GPLv2
+
+
+set -x
+
+echo "Run script from toplevel directory."
+
+docker stop agl-jta-prod
+docker rm -v agl-jta-prod
+docker rm agl-jta-prod
+
+docker images | grep "<none>" | awk '{ print "docker rmi " $3 }' | bash
+
+
+# small adaptions for deployment:
+sed -i -e "s#ftp.us.d#httpredir.d#g" Dockerfile
+sed -i -e "s#HTTP_PORT=8080#HTTP_PORT=8082#g" frontend-install/jenkins.cfg
+
+./install.sh
+
+#sudo docker create -it -p 8082:8082 -p 50002:50002 -v /srv/JTA-USERDATA:/userdata --env JENKINS_OPTS="--httpPort=8082" --env JENKINS_SLAVE_AGENT_PORT=50002 --name agl-jta-prod agl-jta
+sudo docker create -it -p 8082:8082 -p 50002:50002 -v /root/AGL-JTA/userdata:/userdata --env JENKINS_OPTS="--httpPort=8082" --env JENKINS_SLAVE_AGENT_PORT=50002 --name agl-jta-prod agl-jta
+
+CONTAINER_ID=`sudo docker ps -l -q`
+echo $CONTAINER_ID > container_id
+
+sleep 1
+docker start agl-jta-prod