Skip to content

Commit

Permalink
Update Ansible, base image and remove vagrant image. (#20)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gerrit91 authored Jun 2, 2022
1 parent 8ac9783 commit 1b11ad4
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 175 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
name: Docker Build Action
on:
pull_request:
branches:
- master
release:
types:
- published
push:
branches:
- master

env:
REGISTRY: ghcr.io
IMAGE_NAME: metal-deployment-base

jobs:
build:
name: Build
runs-on: ubuntu-latest
permissions:
packages: write
contents: read

steps:
- name: Check out code into the Go module directory
uses: actions/checkout@v2

- name: Log in to the Container registry
uses: docker/login-action@v1
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Make tag
run: |
[ "${GITHUB_EVENT_NAME}" == 'pull_request' ] && echo "tag=${GITHUB_HEAD_REF##*/}" >> $GITHUB_ENV || true
[ "${GITHUB_EVENT_NAME}" == 'release' ] && echo "tag=${GITHUB_REF##*/}" >> $GITHUB_ENV || true
[ "${GITHUB_EVENT_NAME}" == 'push' ] && echo "tag=latest" >> $GITHUB_ENV || true
- name: Build and push image
uses: docker/build-push-action@v2
with:
context: .
push: true
tags: ${{ env.REGISTRY }}/${{ github.repository_owner }}/${{ env.IMAGE_NAME }}:${{ env.tag }}
41 changes: 0 additions & 41 deletions .github/workflows/master-deployment.yaml

This file was deleted.

45 changes: 0 additions & 45 deletions .github/workflows/pull_request.yaml

This file was deleted.

33 changes: 0 additions & 33 deletions .github/workflows/release-deployment.yaml

This file was deleted.

15 changes: 15 additions & 0 deletions .github/workflows/release-drafter.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
name: Release Drafter Action

on:
push:
branches:
- master

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: release-drafter/release-drafter@v5
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
24 changes: 16 additions & 8 deletions metal-deployment/base/Dockerfile → Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
FROM debian:bullseye
FROM debian:11-slim

ENV VERSION_ANSIBLE=4.2.0 \
ENV VERSION_ANSIBLE=5.8.0 \
VERSION_CT=0.9.0 \
VERSION_HELM=3.6.2
VERSION_HELM=3.9.0 \
CLOUD_SDK_VERSION=388.0.0

ENV PATH /google-cloud-sdk/bin:$PATH

RUN set -x \
&& apt-get update \
Expand All @@ -12,30 +15,35 @@ RUN set -x \
curl \
gnupg2 \
software-properties-common \
&& curl -f https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - \
&& curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - \
&& add-apt-repository "deb [arch=amd64] http://packages.cloud.google.com/apt cloud-sdk-buster main" \
&& add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian buster stable" \
&& apt-get update \
&& apt-get install --yes --no-install-recommends \
connect-proxy \
docker-ce \
git \
google-cloud-sdk \
make \
openssh-client \
python3 \
python3-pip \
python3-setuptools \
python3-wheel \
rsync \
yamllint \
&& apt clean \
&& apt autoclean \
&& ln -s /usr/bin/python3 /usr/bin/python \
&& ln -s /usr/bin/python3-config /usr/bin/python-config \
&& ln -s /usr/bin/python3-doc /usr/bin/python-doc \
&& curl -O https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \
&& tar xzf google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \
&& rm google-cloud-sdk-${CLOUD_SDK_VERSION}-linux-x86_64.tar.gz \
&& gcloud config set core/disable_usage_reporting true \
&& gcloud config set component_manager/disable_update_check true \
&& gcloud config set metrics/environment github_docker_image \
&& gcloud --version \
&& curl -fsSL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -s -- --version "v${VERSION_HELM}" \
&& python3 -m pip install --upgrade pip \
&& python3 -m pip install ansible==${VERSION_ANSIBLE} Jinja2==3.0.1 netaddr==0.8.0 humanfriendly==9.2 openshift==0.12.1 paramiko==2.7.2 \
&& python3 -m pip install ansible==${VERSION_ANSIBLE} Jinja2==3.0.1 netaddr==0.8.0 humanfriendly==9.2 openshift==0.13.1 paramiko==2.11.0 \
&& curl -Lo ct https://github.com/coreos/container-linux-config-transpiler/releases/download/v${VERSION_CT}/ct-v${VERSION_CT}-x86_64-unknown-linux-gnu \
&& chmod +x ct \
&& mv ct /usr/local/bin/ \
Expand Down
8 changes: 2 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
# metal-stack Dockerfiles
# metal-stack deployment

This repository defines and builds some basic Dockerfiles that are used in the metal-stack.

| Name | Description |
| --------------------- | --------------------------------------------------- |
| metal-deployment-base | Can be used when deploying metal-stack with Ansible |
This repository builds the deployment base image that can be used for deploying metal-stack with Ansible.
22 changes: 0 additions & 22 deletions metal-deployment/base/Dockerfile.withvagrant

This file was deleted.

17 changes: 0 additions & 17 deletions metal-deployment/base/Makefile

This file was deleted.

3 changes: 0 additions & 3 deletions metal-deployment/base/README.md

This file was deleted.

0 comments on commit 1b11ad4

Please sign in to comment.