First, create a few volumes so that state is persisted across restarts:
docker volume create nats1
docker volume create nats2
docker volume create nats3
Now create a docker-compose.yaml
with the following:
First, create a few volumes so that state is persisted across restarts:
docker volume create nats1
docker volume create nats2
docker volume create nats3
Now create a docker-compose.yaml
with the following:
# All commands will be executed on a Proxmox host | |
sudo apt update -y && sudo apt install libguestfs-tools -y | |
wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img | |
# Install qemu-guest-agent on the image. Additional packages can be specified by separating with a comma. | |
sudo virt-customize -a jammy-server-cloudimg-amd64.img --install qemu-guest-agent | |
# Read and set root user password from file. | |
sudo virt-customize -a jammy-server-cloudimg-amd64.img --root-password file:password_root.txt | |
# Create an additional user. | |
sudo virt-customize -a jammy-server-cloudimg-amd64.img --run-command "useradd -m -s /bin/bash myuser" | |
# Set password for that user. |
# Stolen from | |
# https://github.com/nginxinc/nginx-unsupported-modules/blob/master/ngx_otel_module/Dockerfile.base.debian | |
# plus | |
# https://github.com/nginxinc/nginx-unsupported-modules/blob/master/ngx_otel_module/Dockerfile.debian | |
# Updated to build on U18, and had to update the apt-add-repository for cmake to target bionic | |
# Updated to build DEBUG target for debugging | |
FROM <local_repo>/ubuntu18:latest | |
ENV DEBIAN_FRONTEND=noninteractive | |
ENV GRPC_VERSION_TAG=v1.36.4 |
#!/bin/bash | |
set -o errexit | |
set -o pipefail | |
set -o nounset | |
postgres_ready() { | |
python << END | |
import sys |
#cloud-config | |
instance-id: my-vm-host | |
local-hostname: my-vm-host |
FROM nginx AS build | |
WORKDIR /src | |
RUN apt-get update && \ | |
apt-get install -y git gcc make mercurial libperl-dev libpcre3-dev zlib1g-dev libxslt1-dev libgd-ocaml-dev libgeoip-dev | |
RUN git clone -b openssl-3.0 https://github.com/openssl/openssl openssl-3.0 && \ | |
hg clone https://hg.nginx.org/nginx && \ | |
hg clone http://hg.nginx.org/njs | |
RUN cd nginx && \ | |
auto/configure `nginx -V 2>&1 | sed "s/ \-\-/ \\\ \n\t--/g" | grep "\-\-" | grep -ve opt= -e param=` \ |
#!/bin/bash | |
set -xe | |
systemctl enable docker | |
modprobe br_netfilter | |
cat <<EOF | tee /etc/modules-load.d/k8s.conf | |
br_netfilter | |
EOF |
apt-get update && apt-get install -y apt-transport-https ca-certificates curl software-properties-common
lsmod | grep br_netfilter
modprobe br_netfilter
cat <<EOF | sudo tee /etc/modules-load.d/k8s.conf
br_netfilter
kind: Ingress | |
metadata: | |
name: kubeapi | |
namespace: default | |
annotations: | |
nginx.ingress.kubernetes.io/secure-backends: "true" | |
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" | |
spec: | |
rules: | |
- host: "api.devops.example.com" |