Skip to content

Commit

Permalink
Update Geodesic, restore some old support (#116)
Browse files Browse the repository at this point in the history
  • Loading branch information
Nuru authored Jan 17, 2021
1 parent 05d8042 commit 290a20f
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 4 deletions.
26 changes: 23 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG VERSION=0.139.3
ARG VERSION=0.141.1
ARG OS=alpine
FROM cloudposse/geodesic:$VERSION-$OS

Expand Down Expand Up @@ -51,12 +51,28 @@ RUN apk add terraform@cloudposse \
terraform-0.13@cloudposse \
terraform-0.14@cloudposse

# Place configuration in 'conf/' directory
COPY conf/ /conf/
# Use aws-vault for credentials
ENV AWS_VAULT_ENABLED=true
# Pin aws-vault to a version <5.0
# There are bugs with aws credential caching that make version 5 more annoying to use; see:
# https://github.com/99designs/aws-vault/issues/552
# https://github.com/cloudposse/geodesic/pull/579
# There are other bugs with version 6.0
# https://github.com/99designs/aws-vault/issues/689
# and until IMDSv2 is supported, aws-vault server does not work with kops 1.18
# https://github.com/99designs/aws-vault/issues/690
RUN apk add -u aws-vault@cloudposse~=4

# Filesystem entry for tfstate
RUN s3 fstab '${TF_BUCKET}' '/' '/secrets/tf'

# Use `direnv` for configuration
ENV DIRENV_ENABLED=true
# Support make-based builds
ENV MAKE_INCLUDES="Makefile Makefile.*"
# Explicitly set KUBECONFIG to enable kube_ps1 prompt
ENV KUBECONFIG=/conf/.kube/config

# kops config
ENV KOPS_CLUSTER_NAME="us-west-2.testing.cloudposse.co"
ENV KOPS_DNS_ZONE=${KOPS_CLUSTER_NAME}
Expand All @@ -73,6 +89,10 @@ ENV NODE_MIN_SIZE="4"

COPY rootfs/ /

# Place configuration in 'conf/' directory
COPY conf/ /conf/
RUN touch $KUBECONFIG && chmod 600 $KUBECONFIG

# Install atlantis
RUN curl -fsSL -o /usr/bin/atlantis https://github.com/cloudposse/atlantis/releases/download/0.9.0.3/atlantis_linux_amd64 && \
chmod 755 /usr/bin/atlantis
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ push:

## Install wrapper script from geodesic container
install:
@docker run --rm $(DOCKER_IMAGE_NAME) | sudo -E bash -s $(DOCKER_TAG)
@docker run --rm $(DOCKER_IMAGE_NAME) | bash -s $(DOCKER_TAG) || \
echo '"make install" failed, try "sudo make instal"' >&2

## Start the geodesic shell by calling wrapper script
run:
Expand Down

0 comments on commit 290a20f

Please sign in to comment.