sparse-intern-71089
03/25/2021, 5:12 PMbillowy-army-68599
agreeable-ram-97887
03/25/2021, 5:35 PMimage: python:3.7.9-buster
before_script:
- apt-get update -y
- apt-get install sudo -y
- python3 -m venv infra/venv
- infra/venv/bin/python -m pip install --upgrade pip setuptools wheel
- infra/venv/bin/python -m pip install -r infra/requirements.txt
- bash ./pulumiSetup/setup.sh
stages:
- preview
- deploy
pulumi-preview:
stage: preview
services:
- docker:dind
script:
- bash ./pulumiSetup/pulumi-preview.sh
pulumi-deploy:
stage: deploy
services:
- docker:dind
script:
- bash ./pulumiSetup/pulumi-up.sh
only:
- master
agreeable-ram-97887
03/25/2021, 5:37 PMpulumiSetup/setup.sh
is like this:
#!/bin/bash
# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x
# Download and install required tools
# update the GitLab Runner and install other packages
apt-get update -y
apt-get install sudo python3-pip python3-venv unzip wget curl -y
curl -fsSL <https://get.pulumi.com/> | bash
export PATH=$PATH:$HOME/.pulumi/bin
export PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN
# Login into pulumi. This will require the PULUMI_ACCESS_TOKEN environment variable
# pulumi config set --secret pulumi-access-token $PULUMI_ACCESS_TOKEN
pulumi login
curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"
unzip -qq awscliv2.zip
sudo ./aws/install
agreeable-ram-97887
03/25/2021, 5:38 PMpulumiSetup/pulumi-preview.sh
is like this:
#!/bin/bash
# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x
# Add the pulumi CLI to the PATH
export PATH=$PATH:$HOME/.pulumi/bin
# AWS creds here - variables with $ to be set on gitlab var env
aws configure set default.region '$AWS_DEFAULT_REGION'
aws configure set aws_access_key_id '$AWS_ACCESS_KEY_ID'
aws configure set aws_secret_access_key '$AWS_SECRET_ACCESS_KEY'
echo $AWS_ACCESS_KEY_ID
echo $AWS_SECRET_ACCESS_KEY
pulumi stack select accure1/dev --cwd "/builds/accure1/code/el/corvus/infra/"
# preview configuration before deployment
pulumi preview --cwd "/builds/accure1/code/el/corvus/infra/"
billowy-army-68599
white-secretary-18260
03/25/2021, 5:42 PMdocker in docker,
yes.white-secretary-18260
03/25/2021, 5:44 PMDockerfile
with:
# SETUP DOCKER
RUN curl -fsSL <https://get.docker.com> -o get-docker.sh
RUN sudo sh get-docker.sh
RUN sudo service docker start
white-secretary-18260
03/25/2021, 5:45 PMsudo
RUN apt-get install sudo -y
agreeable-ram-97887
03/25/2021, 6:37 PMpulumi preview
call 🤔 . Any ideas?
Btw, the new pulumiSetup/setup.sh
script that im using is (note the additional install docker lines):
#!/bin/bash
# exit if a command returns a non-zero exit code
# print the commands and their args as they are executed
set -e -x
# Download and install required tools
# update the GitLab Runner and install other packages
apt-get update -y
apt-get install sudo python3-pip python3-venv unzip wget curl -y
# SETUP DOCKER
curl -fsSL <https://get.docker.com> -o get-docker.sh
sudo sh get-docker.sh
sudo service docker start
# INSTALL PULUMI
curl -fsSL <https://get.pulumi.com/> | bash
export PATH=$PATH:$HOME/.pulumi/bin
export PULUMI_ACCESS_TOKEN=$PULUMI_ACCESS_TOKEN
# Login into pulumi. This will require the PULUMI_ACCESS_TOKEN environment variable
# pulumi config set --secret pulumi-access-token $PULUMI_ACCESS_TOKEN
pulumi login
curl "<https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip>" -o "awscliv2.zip"
unzip -qq awscliv2.zip
sudo ./aws/install
white-secretary-18260
03/25/2021, 6:49 PM--verbose 999
on there and see what it brings.agreeable-ram-97887
03/25/2021, 7:27 PMpulumi preview
. I'm running it again now with the increased verbosity, so hopefully will have some more info soon. But anyway I guess I'll need to implement some sort of caching of the image getting built