blob: 67ef5b27a35ce290e827e5e47f1c2bc77612a665 [file] [log] [blame]
Ivan Berezovskiyc46e7c02018-10-29 18:22:09 +04001#!/bin/bash -xe
2
3FORMULA_VERSION=${FORMULA_VERSION:-2018.3.1}
4APT_MIRANTIS_SALT_REPO=${APT_MIRANTIS_SALT_REPO:-"http://apt.mirantis.com/xenial/ $FORMULA_VERSION salt"}
5SALT_OPTS="-t 10 --retcode-passthrough --no-color"
6
7echo "deb [arch=amd64] ${APT_MIRANTIS_SALT_REPO}" > /etc/apt/sources.list.d/mcp_salt.list
8apt-get update
9apt-get install salt-formula* -y
10
Ivan Berezovskiy738ce822018-11-16 13:00:24 +040011salt-call ${SALT_OPTS} saltutil.clear_cache
12salt-call ${SALT_OPTS} saltutil.refresh_pillar
13salt-call ${SALT_OPTS} saltutil.sync_all
Ivan Berezovskiyc46e7c02018-10-29 18:22:09 +040014salt-call ${SALT_OPTS} reclass.validate_pillar
15
16salt-call ${SALT_OPTS} state.sls linux.system.repo,linux.system.package,linux.system.user,linux.system.directory,linux.system.config
17salt-call ${SALT_OPTS} state.sls linux.network
18salt-call ${SALT_OPTS} state.sls salt.minion.ca
19
20salt-call ${SALT_OPTS} state.sls salt
21salt-call ${SALT_OPTS} state.sls docker.host
22salt-call ${SALT_OPTS} saltutil.sync_all
23
Ivan Berezovskiy23035a22018-11-14 13:25:51 +040024docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/mysql:${MCP_VERSION}"
25docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/gerrit:${MCP_VERSION}"
26docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/jenkins:${MCP_VERSION}"
27docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/jnlp-slave:${MCP_VERSION}"
28docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/cicd/phpldapadmin:${MCP_VERSION}"
29docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/model-generator/operations-api:${MCP_VERSION}"
30docker pull "docker-prod-local.artifactory.mirantis.com/mirantis/model-generator/operations-ui:${MCP_VERSION}"
31# Mirror images below into artifactory
Ivan Berezovskiyc46e7c02018-10-29 18:22:09 +040032docker pull jboss/keycloak:4.5.0.Final
33docker pull jboss/keycloak-proxy:3.4.2.Final
Ivan Berezovskiy23035a22018-11-14 13:25:51 +040034docker pull cockroachdb/cockroach:v2.1.0
35# FIXME: setup build for images below with proper versions and publish to artifactory
36docker pull atengler/cockroach-init:latest
Ivan Berezovskiyc46e7c02018-10-29 18:22:09 +040037echo "---------------------"
38docker images
39echo "---------------------"