| #!/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"} |
| SALT_OPTS="-t 10 --retcode-passthrough --no-color" |
| |
| echo "deb [arch=amd64] ${APT_MIRANTIS_SALT_REPO}" > /etc/apt/sources.list.d/mcp_salt.list |
| apt-get update |
| apt-get install salt-formula* -y |
| |
| salt-call ${SALT_OPTS} saltutil.clear_cache |
| salt-call ${SALT_OPTS} saltutil.refresh_pillar |
| salt-call ${SALT_OPTS} saltutil.sync_all |
| salt-call ${SALT_OPTS} reclass.validate_pillar |
| |
| salt-call ${SALT_OPTS} state.sls linux.system.repo,linux.system.package,linux.system.user,linux.system.directory,linux.system.config |
| salt-call ${SALT_OPTS} state.sls linux.network |
| salt-call ${SALT_OPTS} state.sls salt.minion.ca |
| |
| salt-call ${SALT_OPTS} state.sls salt |
| salt-call ${SALT_OPTS} state.sls docker.host |
| |
| sed -i "s/mcp_version:.*/mcp_version: ${MCP_VERSION}/g" /srv/salt/reclass/classes/cluster/try-mcp/overrides.yml |
| |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/mysql:${MCP_VERSION}" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/gerrit:${MCP_VERSION}" |
| 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}" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/phpldapadmin:${MCP_VERSION}" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/model-generator/operations-api:${MCP_VERSION}" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/model-generator/operations-ui:${MCP_VERSION}" |
| # Mirror images below into artifactory |
| docker pull jboss/keycloak:4.5.0.Final |
| docker pull jboss/keycloak-proxy:3.4.2.Final |
| docker pull cockroachdb/cockroach:v2.1.0 |
| # FIXME: setup build for images below with proper versions and publish to artifactory |
| docker pull atengler/cockroach-init:latest |
| echo "---------------------" |
| docker images |
| echo "---------------------" |