| #!/bin/bash -xe |
| |
| MCP_VERSION=${MCP_VERSION:-nightly} |
| APT_MIRANTIS_SALT_REPO=${APT_MIRANTIS_SALT_REPO:-"http://mirror.mirantis.com/${MCP_VERSION}/salt-formulas/xenial xenial main"} |
| 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,openssh |
| 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/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}" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/mysql:${MCP_VERSION}" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/external/jboss/keycloak:4.5.0.Final" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/external/jboss/keycloak-proxy:3.4.2.Final" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/external/cockroachdb/cockroach:v2.1.0" |
| docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/external/atengler/cockroach-init/cockroach-init:v2.0.6" |
| echo "---------------------" |
| docker images |
| echo "---------------------" |