Small refactoring for packer scripts
* Get rid of formula version variable and use MCP_VERSION instead
* Remove docker images pull
* Remove adding of jenkins theme b/c it's already inside docker image
* Move flag for jenkins in docker to /opt
Closes-task: #PROD-24048 (PROD:24048)
Change-Id: I41a1c4771d9cf890bd371264a35727ded6fc52a8
diff --git a/day01-image/scripts/salt.sh b/day01-image/scripts/salt.sh
index ffa106b..6074f21 100644
--- a/day01-image/scripts/salt.sh
+++ b/day01-image/scripts/salt.sh
@@ -1,7 +1,7 @@
#!/bin/bash -xe
-FORMULA_VERSION=${FORMULA_VERSION:-2018.3.1}
-APT_MIRANTIS_SALT_REPO=${APT_MIRANTIS_SALT_REPO:-"http://apt.mirantis.com/xenial/ $FORMULA_VERSION salt"}
+MCP_VERSION=${MCP_VERSION:-proposed}
+APT_MIRANTIS_SALT_REPO=${APT_MIRANTIS_SALT_REPO:-"http://apt.mirantis.com/xenial/ $MCP_VERSION salt"}
SALT_OPTS="-t 10 --retcode-passthrough --no-color"
echo "deb [arch=amd64] ${APT_MIRANTIS_SALT_REPO}" > /etc/apt/sources.list.d/mcp_salt.list
@@ -33,17 +33,8 @@
salt-call ${SALT_OPTS} state.sls_id maas_cluster_packages maas
salt-call ${SALT_OPTS} state.sls_id maas_region_packages maas
-# FIXME move those into cluster model
-git clone https://github.com/Mirantis/docker-jenkins.git
-mkdir -p /srv/volumes/jenkins/userContent/theme/
-cp -r docker-jenkins/theme/* /srv/volumes/jenkins/userContent/theme/
-rm -rf docker-jenkins
-chown -R 1000:1000 /srv/volumes/jenkins/userContent/
-
-docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/jenkins:${MCP_VERSION}"
-docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/jnlp-slave:${MCP_VERSION}"
# Flag for cloud-init script
-touch /root/jenkins_in_docker
+touch /opt/jenkins_in_docker
# Duplicate of ubuntu_info.sh
mkdir -p /var/log/bootstrap_logs/ ; pushd /var/log/bootstrap_logs/