Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/github.com/prometheus/…
Browse files Browse the repository at this point in the history
…client_golang-1.11.1
  • Loading branch information
nicholasjackson authored Aug 7, 2023
2 parents 91aa27a + d002aee commit 03f511b
Show file tree
Hide file tree
Showing 152 changed files with 5,463 additions and 2,084 deletions.
168 changes: 81 additions & 87 deletions .github/workflows/build_and_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ jobs:
'./examples/single_k3s_cluster',
'./examples/multiple_k3s_clusters',
'./examples/local_exec',
'./examples/remote_exec',
'./examples/certificates',
]

Expand Down Expand Up @@ -168,97 +169,90 @@ jobs:
tile: ${{ github.job_id }}
description: "Functional tests for docker: ${{matrix.folder}}"

# functional_test_podman:
# name: Functional Test Podman
# runs-on: ubuntu-latest
# needs: functional_test_docker

# strategy:
# max-parallel: 2
# fail-fast: false
# matrix:
# folder: [
# './examples/container',
# './examples/build',
# './examples/docs',
# './examples/single_k3s_cluster',
# './examples/nomad',
# './examples/local_exec',
# ]
functional_test_podman:
name: Functional Test Podman
runs-on: ubuntu-latest
needs: functional_test_build

# steps:
# - name: Download-Binaries
# uses: actions/download-artifact@v2
# with:
# name: test_binary
# path: /usr/local/bin
#
# - name: Make binary executable
# run: |
# sudo chmod +x /usr/local/bin/shipyard
strategy:
max-parallel: 2
fail-fast: false
matrix:
folder: [
'./examples/container',
# './examples/build',
# './examples/docs',
'./examples/single_k3s_cluster',
'./examples/nomad',
# './examples/local_exec',
]

# - uses: actions/checkout@v2
steps:
- name: Download-Binaries
uses: actions/download-artifact@v2
with:
name: test_binary
path: /usr/local/bin

- name: Make binary executable
run: |
sudo chmod +x /usr/local/bin/jumppad
# - name: Setup Go version
# uses: actions/setup-go@v1
# with:
# go-version: 1.19
#
# - name: Install dependencies for Podman tests
# run: |
# sudo apt install -y libbtrfs-dev pkg-config libgpgme-dev libdevmapper-dev podman dnsmasq
#
# - name: Setup DNSMasq default nameserver resolution
# run: |
# echo "disable resovld listening on 53"
# sudo /bin/bash -c 'echo "DNSStubListener=no" >> /etc/systemd/resolved.conf'
# sudo /bin/bash -c 'echo "DNS=8.8.8.8" >> /etc/systemd/resolved.conf'
# sudo systemctl restart systemd-resolved.service

# echo "configure dnsmasq"
# sudo /bin/bash -c 'echo "server=8.8.8.8" >> /etc/dnsmasq.conf'
# sudo /bin/bash -c 'echo "server=1.1.1.1" >> /etc/dnsmasq.conf'
# sudo systemctl restart dnsmasq

# sudo /bin/bash -c 'echo "127.0.0.1 ubuntu" >> /etc/hosts'
#
# - name: Setup Podman sock
# run: |
# sudo sed '/^SocketMode=.*/a SocketGroup=docker' -i /lib/systemd/system/podman.socket
# sudo chmod +x /run/podman

# sudo systemctl enable podman.socket
# sudo systemctl enable podman.service
# sudo systemctl start podman.service
# sudo podman info
#
# - name: Setup Podman dnsname plugin
# run: |
# mkdir -p /usr/libexec/cni
# sudo cp /usr/local/bin/dnsname /usr/libexec/cni
#
# - name: Setup Podman registries for Docker.io
# run: |
# echo -e "[registries.search]\nregistries = ['docker.io']" | sudo tee /etc/containers/registries.conf

# - name: Run tests Podman
# uses: nick-invision/retry@v2
# with:
# timeout_seconds: 600
# max_attempts: 3
# retry_on: error
# command: |
# export DOCKER_HOST=unix:///run/podman/podman.sock
# shipyard check
# shipyard test ${{matrix.folder}}
- uses: actions/checkout@v2

# - name: Send status to Discord
# uses: sarisia/actions-status-discord@v1
# if: always()
# with:
# webhook: ${{ secrets.DISCORD_WEBHOOK }}
# tile: ${{ github.job_id }}
# description: "Functional tests for ${{matrix.folder}}"
- name: Setup Go version
uses: actions/setup-go@v1
with:
go-version: 1.19

- name: Install dependencies for Podman tests
run: |
sudo mkdir -p /etc/apt/keyrings
# Debian Testing/Bookworm
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Testing/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Testing/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
# Debian Unstable/Sid
curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Unstable/Release.key \
| gpg --dearmor \
| sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/Debian_Unstable/ /" \
| sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
# Install Podman
sudo apt-get update
sudo apt-get -y upgrade
sudo apt-get -y install podman
# Start the Podman sock
sudo nohup podman system service -t 0 > ./podman.log &
sleep 10
sudo chmod +x /run/podman
sudo chmod 777 /run/podman/podman.sock
- name: Run tests
run: |
jumppad check
jumppad purge
jumppad test ${{matrix.folder}}
env:
DOCKER_HOST: "unix:///run/podman/podman.sock"

- name: Send status to Discord
uses: sarisia/actions-status-discord@v1
if: always()
with:
webhook: ${{ secrets.DISCORD_WEBHOOK }}
tile: ${{ github.job_id }}
description: "Functional tests for ${{matrix.folder}}"

build_dev:
name: Build Dev Version
Expand Down
22 changes: 21 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,27 @@
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [

{
"name": "Debug - Connector",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceFolder}",
"env": {
"LOG_LEVEL": "debug"
},
"args": [
"connector",
"run",
"--grpc-bind=:30001",
"--http-bind=:30002",
"--api-bind=:30003",
"--root-cert-path=~/.jumppad/certs/root.cert",
"--server-cert-path=~/.jumppad/certs/leaf.cert",
"--server-key-path=~/.jumppad/certs/leaf.key",
"--log-level=debug"
]
},
{
"name": "Debug - Up",
"type": "go",
Expand Down
9 changes: 9 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Change Log

## version v0.7.0
* Update K3s to 1.27.4
* Update Nomad to 1.6.1

## version v0.6.0
* Add new `dev` command to watch the given config for changes and automatically
run `up`
* Change behavior of `up` to destroy any resources not in the current config

## version v0.5.9
* Changed health checks to move checks like kubernetes pods to specific resources
* Added exec health check for containers
Expand Down
Loading

0 comments on commit 03f511b

Please sign in to comment.