Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWS Elastic Kubernetes Service Kubernetes 1.28 Update #237

Open
wants to merge 14 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .python-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.9.12
3.11.6
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python 3.11.6
pulumi 3.92.0
14 changes: 12 additions & 2 deletions bin/setup_venv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ function distro_like() {

script_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 && pwd)"

echo "[DEBUG] script_dir set to $script_dir"

# Unset if defined
unset VIRTUAL_ENV

Expand Down Expand Up @@ -91,7 +93,7 @@ if ! command -v python3 >/dev/null; then

mkdir -p "${PYENV_ROOT}"
git_clone_log="$(mktemp -t pyenv_git_clone-XXXXXXX.log)"
if git clone --depth 1 --branch v2.0.3 https://github.com/pyenv/pyenv.git "${PYENV_ROOT}" 2>"${git_clone_log}"; then
if git clone --depth 1 --branch v2.3.31 https://github.com/pyenv/pyenv.git "${PYENV_ROOT}" 2>"${git_clone_log}"; then
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annotation:
Older versions of pyenv don't know about the newer python version we are using.

rm "${git_clone_log}"
else
echo >&2 "Error cloning pyenv repository:"
Expand Down Expand Up @@ -191,6 +193,9 @@ source "${VIRTUAL_ENV}/bin/activate"

set -o nounset # abort on unbound variable

echo "USING PYTHON VERSION $(python --version) FROM $(which python)"
echo "PIP VERSION $(pip3 --version) FROM $(which pip3)"

# Use the latest version of pip and pipenv
pip3 install --upgrade pip
pip3 install pipenv
Expand All @@ -199,9 +204,10 @@ pip3 install pipenv
# in the installation of other build tools and dependencies
# required by the other python packages.
pip3 install wheel
pip3 install nodeenv

# `pipenv sync` uses only the information in the `Pipfile.lock` ensuring repeatable builds
PIPENV_VERBOSITY=-1 PIPENV_PIPFILE="${script_dir}/../pulumi/python/Pipfile" pipenv sync --dev
# PIPENV_VERBOSITY=-1 PIPENV_PIPFILE="${script_dir}/../pulumi/python/Pipfile" pipenv sync --dev

# Install node.js into virtual environment so that it can be used by Python
# modules that make call outs to it.
Expand All @@ -211,10 +217,14 @@ else
echo "Node.js version $("${VIRTUAL_ENV}/bin/node" --version) is already installed"
fi

echo "About to install deps"
# Install general package requirements
# `pipenv sync` uses only the information in the `Pipfile.lock` ensuring repeatable builds
PIPENV_VERBOSITY=-1 PIPENV_PIPFILE="${script_dir}/../pulumi/python/Pipfile" pipenv sync


echo "about to install local pulumi utils"
pip3 install setuptools
# Install local common utilities module
pip3 install "${script_dir}/../pulumi/python/utility/kic-pulumi-utils"

Expand Down
2 changes: 1 addition & 1 deletion config/pulumi/Pulumi.stackname.yaml.example
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ config:
# kic:image_name: docker.io/nginx/nginx-ingress:2.4.2
# kic:image_name: nginx/nginx-ingress:2.4.2
# kic:image_name: nginx/nginx-ingress:2.4.2-alpine
kic:image_name: nginx/nginx-ingress:2.4.2
kic:image_name: nginx/nginx-ingress:3.3.1


############################################################################
Expand Down
10 changes: 6 additions & 4 deletions docker/Dockerfile.debian
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG ARCH=amd64

FROM $ARCH/docker:latest AS docker

FROM $ARCH/debian:bullseye-slim
FROM $ARCH/debian:bookworm-slim
ARG DEBIAN_FRONTEND=noninteractive
ARG UID
ARG GID
Expand Down Expand Up @@ -35,9 +35,11 @@ RUN set -eux; \
nano \
vim \
wget \
zlib1g-dev; \
su --group runner runner --login --command '/pulumi/projects/kic-reference-architectures/bin/setup_venv.sh'; \
echo 'source /pulumi/projects/kic-reference-architectures/pulumi/python/venv/bin/activate' >> /pulumi/projects/kic-reference-architectures/.bashrc; \
zlib1g-dev;

RUN su --group runner runner --login --command '/pulumi/projects/kic-reference-architectures/bin/setup_venv.sh';

RUN echo 'source /pulumi/projects/kic-reference-architectures/pulumi/python/venv/bin/activate' >> /pulumi/projects/kic-reference-architectures/.bashrc; \
apt-get purge --yes \
gcc \
libbz2-dev \
Expand Down
4 changes: 2 additions & 2 deletions docker/Dockerfile.ubuntu
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
ARG ARCH=amd64

FROM $ARCH/docker:latest AS docker
FROM --platform=linux/amd64 docker:latest AS docker

FROM $ARCH/ubuntu:focal
FROM --platform=linux/amd64 ubuntu:23.04
ARG DEBIAN_FRONTEND=noninteractive
ARG UID
ARG GID
Expand Down
1 change: 1 addition & 0 deletions docker/build_dev_docker_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ i386) ARCH="386" ;;
i686) ARCH="386" ;;
x86_64) ARCH="amd64" ;;
aarch64) ARCH="arm64v8" ;;
arm64) ARCH="arm64v8" ;;
arm) dpkg --print-architecture | grep -q "arm64" && ARCH="arm64v8" || ARCH="arm" ;;
*)
echo >&2 "Unable to determine system architecture."
Expand Down
24 changes: 10 additions & 14 deletions pulumi/python/Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,25 @@ verify_ssl = true
name = "pypi"

[packages]
awscli = "~=1.25.35"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

annotation:
The AWS cli has some pretty strict pins on its dependencies. PyYaml specifically. The advice should be to install the v2 aws CLI tool separately.

grpcio = "==1.43.0"
fart = "~=0.1.5"
lolcat = "~=1.4"
passlib = "~=1.7.4"
pulumi-aws = ">=4.39.0"
pulumi-aws = "5.31.0"
pulumi-docker = "==3.1.0"
# pulumi-docker = "~=4.4.4"
pulumi-eks = ">=0.41.2"
pulumi-kubernetes = "==3.20.1"
pulumi-kubernetes = "==3.30.2"
pycryptodome = "~=3.14.0"
requests = "~=2.27.1"
setuptools = "==49.6.0"
setuptools-git-versioning = "==1.9.2"
yamlreader = "==3.0.4"
yamlreader = "*"
pulumi-digitalocean = "==4.12.0"
pulumi-linode = "==3.7.1"
linode-cli = "~=5.17.2"
pulumi = "~=3.36.0"
PyYAML = "~=5.4.1"
nodeenv = "~=1.6.0"

[dev-packages]
wheel = "~=0.37.1"
pulumi = "~=3.93"
grpcio = "*"
PyYAML = "==6.0.1"
wheel = "0.41.3"
nodeenv = "~=1.6.0"

[requires]
python_version = "3.9"
python_version = "3.11"
Loading
Loading