From 7b4db8d2120afee9278ccc2515e9aaa860820b08 Mon Sep 17 00:00:00 2001 From: Jonas Kaninda Date: Tue, 9 Jan 2024 15:24:57 +0100 Subject: [PATCH] Initial commit --- .DS_Store | Bin 0 -> 6148 bytes .github/workflows/build.yml | 40 ++++++++++++++++++++++++++++++++++++ .gitignore | 3 +++ Dockerfile | 21 +++++++++++++++++++ README.md | 15 ++++++++++++++ build.sh | 6 ++++++ 6 files changed, 85 insertions(+) create mode 100644 .DS_Store create mode 100644 .github/workflows/build.yml create mode 100644 .gitignore create mode 100644 Dockerfile create mode 100644 README.md create mode 100755 build.sh diff --git a/.DS_Store b/.DS_Store new file mode 100644 index 0000000000000000000000000000000000000000..12fa5c9b4141fad645c95efc926904abe0041a9a GIT binary patch literal 6148 zcmeHKOHRWu5PdF@`hi84Y>;w-O57k+>4F6txByLCXhfi>r3-f1a|f=#`B=dlj}^5J zY*B?~r1A4-o*h3&nHYc@Z|CR05I~PE*y*$Q!DL*#Wu4H|B|1OH5?d6P)oNB$t!V2w zL*Qb-@m-E1`L|$lB_4Ju*O2qyy1LAoE{3k86_&r$=+ZY z#mgF_oi$D{aC~kn9GtcnAx!1V!PZsUL zy+xcpt}&q+Ij)E!KFvH@FiHKTo$laR61O^e7LZ(3pW(! zSLghx4~NSXtuzHpfqeyzv^kXgKl%OszfZE3DPRixD+OGV-{fO%Ddg7H<|Nmq^jo@^ n#MO!og%zKQ87ryyl<#H2V?oGFV{>{HX%pOXq6+ literal 0 HcmV?d00001 diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..a6f14b4 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,40 @@ +name: Build +on: + push: + branches: [ "main" ] + schedule: + - cron: "0 0 * * 0" + workflow_dispatch: + inputs: + docker_tag: + description: 'Docker tag' + required: true + default: 'latest' + type: string +env: + BUILDKIT_IMAGE: jkaninda/toolkit +jobs: + docker: + runs-on: ubuntu-latest + steps: + - + name: Set up QEMU + uses: docker/setup-qemu-action@v3 + - + name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - + name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + - + name: Build and push + uses: docker/build-push-action@v3 + with: + push: true + platforms: linux/amd64,linux/arm64 + tags: | + "${{env.BUILDKIT_IMAGE}}:lts" + "${{env.BUILDKIT_IMAGE}}:latest" diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2b7225f --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +/.history +data +compose.yaml \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..f483f6c --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +FROM ubuntu:23.10 +RUN apt-get update -qq \ + && apt-get install -qqy apt-transport-https ca-certificates curl gnupg2 software-properties-common jq +RUN curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - +RUN curl https://get.docker.com/ > dockerinstall && chmod 777 dockerinstall && ./dockerinstall + +## Install K6 +RUN curl https://github.com/grafana/k6/releases/download/v0.48.0/k6-v0.48.0-linux-amd64.tar.gz -L | tar xvz --strip-components 1 +RUN mv k6 /usr/local/bin/ +RUN chmod +x /usr/local/bin/k6 + +RUN curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash +RUN mv kustomize /usr/local/bin/kustomize + +RUN curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 +RUN chmod 700 get_helm.sh +RUN ./get_helm.sh + +RUN curl -LO https://dl.k8s.io/release/v1.29.0/bin/linux/amd64/kubectl +RUN chmod +x kubectl +RUN mv kubectl /usr/local/bin/kubectl \ No newline at end of file diff --git a/README.md b/README.md new file mode 100644 index 0000000..fe5a9d6 --- /dev/null +++ b/README.md @@ -0,0 +1,15 @@ +# Toolkit +DevOps toolkit + +[![Build](https://github.com/jkaninda/jenkins/actions/workflows/build.yml/badge.svg)](https://github.com/jkaninda/toolkit/actions/workflows/build.yml) +![Docker Image Size (latest by date)](https://img.shields.io/docker/image-size/jkaninda/toolkit?style=flat-square) + +- [Docker Hub](https://hub.docker.com/r/jkaninda/toolkit) +- [Github](https://github.com/jkaninda/toolkit) + +## Tools: +- docker client +- helm +- kustomize +- jq +- k6 \ No newline at end of file diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..60f201d --- /dev/null +++ b/build.sh @@ -0,0 +1,6 @@ +#!/bin/bash + + docker build -t jkaninda/toolkit:latest . + + docker compose up -d +