diff --git a/dockerfiles/eks-deployer/Dockerfile b/dockerfiles/eks-deployer/Dockerfile index 3ce1ac335..74ed5b062 100644 --- a/dockerfiles/eks-deployer/Dockerfile +++ b/dockerfiles/eks-deployer/Dockerfile @@ -6,7 +6,7 @@ FROM weaveworks/eksctl:v0.212.0 AS eksctl FROM mikefarah/yq:4.47.1 AS yq FROM amazon/aws-cli:2.27.62 -RUN yum update -y && yum install -y jq && yum install -y perl-Digest-SHA && yum clean all +RUN yum update -y && yum install -y jq perl-Digest-SHA openssl && yum clean all COPY --from=eksctl eksctl /usr/local/bin/eksctl COPY --from=yq /usr/bin/yq /usr/local/bin/yq diff --git a/pipelines/shared-tasks/deploy-eks-cluster/task.sh b/pipelines/shared-tasks/deploy-eks-cluster/task.sh index f0675a5ae..8b8d40689 100755 --- a/pipelines/shared-tasks/deploy-eks-cluster/task.sh +++ b/pipelines/shared-tasks/deploy-eks-cluster/task.sh @@ -13,7 +13,7 @@ aws configure set credential_source Environment --profile service-account aws configure set role_arn "$AWS_ROLE_ARN" --profile service-account # Set some variables. -CLUSTER_NAME="eks-$(python -c 'import os,binascii; print binascii.b2a_hex(os.urandom(8))')" +CLUSTER_NAME="eks-$(openssl rand -hex 8)" ADMIN_USERNAME="$CLUSTER_NAME-admin" export CLUSTER_NAME export ADMIN_USERNAME