aboutsummaryrefslogtreecommitdiffstats
path: root/docs/scripts/agl-deploy-ci-instance.sh
diff options
context:
space:
mode:
Diffstat (limited to 'docs/scripts/agl-deploy-ci-instance.sh')
-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