Skip to content

Commit

Permalink
Merge pull request #2 from kubespace-io/test-packages
Browse files Browse the repository at this point in the history
update components to update the main branch
  • Loading branch information
d-vm authored Jul 24, 2023
2 parents dfe2afd + f1ffbb1 commit f3be3bc
Show file tree
Hide file tree
Showing 14 changed files with 325 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/debian.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: debian-base

on:
push:
branches:
- 'main'
# - 'test-packages'
paths:
- "base-images/debian/**"
- "!base-images/debian/README.md"

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Read version from file
id: version
run: echo "::set-output name=VERSION::$(cat ./base-images/debian/version.txt)"

- name: Build and push Docker image
env:
DOCKERFILE_PATH: base-images/debian/Dockerfile
IMAGE_TAG: ${{ steps.version.outputs.VERSION }}
IMAGE_ARG: debian:latest
IMAGE_REF: kubespacedev/debian:${{ steps.version.outputs.VERSION }}
IMAGE_LAST: kubespacedev/debian:latest
run: |
docker build -t ${{ env.IMAGE_REF }} --build-arg IMAGE=${{ env.IMAGE_ARG }} -f ${{ env.DOCKERFILE_PATH }} .
docker push ${{ env.IMAGE_REF }}
docker tag ${{ env.IMAGE_REF }} ${{ env.IMAGE_LAST }}
docker push ${{ env.IMAGE_LAST }}
45 changes: 45 additions & 0 deletions .github/workflows/vault.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: vault

on:
push:
branches:
- 'main'
# - 'test-packages'
paths:
- "vault/**"
- "!vault/README.md"

env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKER_HUB_USERNAME }}
DOCKERHUB_PASSWORD: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

jobs:
build-and-push:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_HUB_USERNAME }}
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }}

- name: Read version from file
id: version
run: echo "::set-output name=VERSION::$(cat ./vault/version.txt)"

- name: Build and push Docker image
env:
DOCKERFILE_PATH: vault/Dockerfile
IMAGE_TAG: ${{ steps.version.outputs.VERSION }}
IMAGE_ARG: kubespacedev/ubuntu:latest
IMAGE_REF: kubespacedev/vault:${{ steps.version.outputs.VERSION }}
IMAGE_LAST: kubespacedev/vault:latest
run: |
docker build -t ${{ env.IMAGE_REF }} --build-arg IMAGE=${{ env.IMAGE_ARG }} -f ${{ env.DOCKERFILE_PATH }} .
docker push ${{ env.IMAGE_REF }}
docker tag ${{ env.IMAGE_REF }} ${{ env.IMAGE_LAST }}
docker push ${{ env.IMAGE_LAST }}
34 changes: 34 additions & 0 deletions base-images/debian/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/engine/reference/builder/#dockerignore-file

**/.DS_Store
**/__pycache__
**/.venv
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
44 changes: 44 additions & 0 deletions base-images/debian/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.jenkins-external
34 changes: 34 additions & 0 deletions base-images/debian/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
ARG IMAGE
FROM ${IMAGE}

# Switch to root user for system updates
USER root

# Install locales
RUN apt-get update && \
apt-get upgrade -y && \
apt-get install -y locales tzdata && \
rm -rf /var/lib/apt/lists/* && \
localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 && \
ln -fs /usr/share/zoneinfo/Europe/Berlin /etc/localtime && \
dpkg-reconfigure -f noninteractive tzdata

# Set environment variables
ENV LANG en_US.utf8

# Install basic libraries
RUN apt-get update && \
apt-get install -y curl wget && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

# Create a non-root user
RUN useradd -m -s /bin/bash kube

USER kube
# Set the working directory to the 'kube' user's home directory
WORKDIR /home/kube

# Default command when starting the container
CMD ["/bin/bash"]
1 change: 1 addition & 0 deletions base-images/debian/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docker build -t debian-testu -f base-images/ubuntu/Dockerfile --build-arg IMAGE=debian:latest .
1 change: 1 addition & 0 deletions base-images/debian/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1.0.0
34 changes: 34 additions & 0 deletions vault/.dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Include any files or directories that you don't want to be copied to your
# container here (e.g., local build artifacts, temporary files, etc.).
#
# For more help, visit the .dockerignore file reference guide at
# https://docs.docker.com/engine/reference/builder/#dockerignore-file

**/.DS_Store
**/__pycache__
**/.venv
**/.classpath
**/.dockerignore
**/.env
**/.git
**/.gitignore
**/.project
**/.settings
**/.toolstarget
**/.vs
**/.vscode
**/*.*proj.user
**/*.dbmdl
**/*.jfm
**/bin
**/charts
**/docker-compose*
**/compose*
**/Dockerfile*
**/node_modules
**/npm-debug.log
**/obj
**/secrets.dev.yaml
**/values.dev.yaml
LICENSE
README.md
44 changes: 44 additions & 0 deletions vault/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# =========================
# Operating System Files
# =========================

# OSX
# =========================

.DS_Store
.AppleDouble
.LSOverride

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk
.jenkins-external
25 changes: 25 additions & 0 deletions vault/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
ARG IMAGE
FROM ${IMAGE}

USER root
WORKDIR /

RUN apt-get update && apt-get install -y gpg unzip
RUN wget https://releases.hashicorp.com/vault/1.14.0-rc1/vault_1.14.0-rc1_linux_amd64.zip && \
unzip vault_1.14.0-rc1_linux_amd64.zip -d /usr/local/bin/ && \
rm vault_1.14.0-rc1_linux_amd64.zip && \
apt-get remove -y unzip && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*

EXPOSE 8200
EXPOSE 8201

USER kube
WORKDIR /home/kube

COPY vault/config.hcl config.hcl
COPY vault/start-vault.sh start-vault.sh

CMD ["sh","start-vault.sh"]
Empty file added vault/README.md
Empty file.
15 changes: 15 additions & 0 deletions vault/config.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
ui = true
disable_mlock = true

storage "file" {
path = "./vault/data"
node_id = "node1"
}

listener "tcp" {
address = "0.0.0.0:8200"
tls_disable = "true"
}

api_addr = "http://0.0.0.0:8200"
cluster_addr = "https://0.0.0.0:8201"
2 changes: 2 additions & 0 deletions vault/start-vault.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/bin/bash
vault server -config=config.hcl
1 change: 1 addition & 0 deletions vault/version.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ui-1.14.0-rc1

0 comments on commit f3be3bc

Please sign in to comment.