Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
86 commits
Select commit Hold shift + click to select a range
aff20f8
Transforma VM em k8s
PedroRegisPOAR Dec 20, 2023
49b81d1
ajusts
PedroRegisPOAR Dec 20, 2023
41f2c70
Adds alias
PedroRegisPOAR Dec 20, 2023
d101c11
Corrige eexemplo mais simples
PedroRegisPOAR Dec 20, 2023
4d53bb4
networking.firewall.enable = false;
PedroRegisPOAR Dec 21, 2023
b5c1a57
runs-on: arc-runner-set
PedroRegisPOAR Dec 21, 2023
ffae541
bump
PedroRegisPOAR Dec 21, 2023
c506c35
Multiplos ajustes, e workflow_dispatch
PedroRegisPOAR Dec 21, 2023
7e8c21a
Simplifica testes
PedroRegisPOAR Dec 21, 2023
57c57a9
Testa instalar nix
PedroRegisPOAR Dec 21, 2023
6ba80ff
Testa instalar curl para instalar nix
PedroRegisPOAR Dec 21, 2023
d7e8c2a
Debugando o ambiente
PedroRegisPOAR Dec 21, 2023
7ddd270
Debugando o ambiente
PedroRegisPOAR Dec 21, 2023
0a0f949
Debugando o ambiente, 3
PedroRegisPOAR Dec 21, 2023
682a1e6
Debugando o ambiente, 4
PedroRegisPOAR Dec 21, 2023
12eab64
Debugando o ambiente, 5
PedroRegisPOAR Dec 21, 2023
41864ad
Debugando o ambiente, 6
PedroRegisPOAR Dec 21, 2023
ff6d19b
Simplifica instruções
PedroRegisPOAR Dec 21, 2023
d29ed06
Ajusta texto
PedroRegisPOAR Dec 21, 2023
1fff743
Ajustes, pricipalmente time.timeZone = "America/Recife";
PedroRegisPOAR Dec 21, 2023
113b773
Ajusts
PedroRegisPOAR Dec 22, 2023
e356c86
Reduz RAM para 8Gigas
PedroRegisPOAR Dec 22, 2023
bc968d8
Debugando o ambiente, DinD tests, 0
PedroRegisPOAR Dec 22, 2023
dd3b62b
Debugando o ambiente, DinD tests, 1
PedroRegisPOAR Dec 22, 2023
7504015
Debugando o ambiente, DinD tests, 2
PedroRegisPOAR Dec 22, 2023
a50873a
Debugando o ambiente, DinD tests, 3
PedroRegisPOAR Dec 22, 2023
8d12241
Debugando o ambiente, DinD tests, 4
PedroRegisPOAR Dec 22, 2023
0415e21
WIP
PedroRegisPOAR Dec 23, 2023
d927884
WIP, testanod dind
PedroRegisPOAR Dec 26, 2023
3e338b1
WIP, testanod dind
PedroRegisPOAR Dec 26, 2023
34ca7e2
WIP, testanod dind
PedroRegisPOAR Dec 26, 2023
574f26d
WIP, testanod dind
PedroRegisPOAR Dec 26, 2023
410a0ac
WIP, testanod dind
PedroRegisPOAR Dec 26, 2023
ab096f3
WIP, testanod dind
PedroRegisPOAR Dec 26, 2023
d3d3cde
WIP, testanod dind
PedroRegisPOAR Dec 26, 2023
7ba7a15
WIP, testanod dind
PedroRegisPOAR Dec 26, 2023
c6ede82
WIP, refatorando, vários patchs
PedroRegisPOAR Dec 26, 2023
a1ac2e0
WIP, dind ainda quebrado
PedroRegisPOAR Dec 27, 2023
a0949ae
Adiciona anotações
PedroRegisPOAR Dec 27, 2023
2590f3a
Adiciona como testar DinD
PedroRegisPOAR Dec 27, 2023
a818cc8
Adiciona link para vídeo
PedroRegisPOAR Dec 27, 2023
f5f08b2
Adiciona TODO sobre hardening
PedroRegisPOAR Dec 27, 2023
2a92ed7
Adds example
PedroRegisPOAR Dec 27, 2023
1438778
Adiciona test-kaniko.yml
PedroRegisPOAR Dec 27, 2023
74f2052
Comenta touch /dev/kvm
PedroRegisPOAR Dec 27, 2023
3480670
Workaround runs-on: kaniko-worker
PedroRegisPOAR Dec 27, 2023
4db6a5a
Testa nodeSelector e volta com runs-on: arc-runner-set
PedroRegisPOAR Dec 27, 2023
0826f06
Volta com instalação parte 2 com helm
PedroRegisPOAR Dec 27, 2023
07ab3d1
Ajustes
PedroRegisPOAR Dec 27, 2023
6335753
runs-on: nixos
PedroRegisPOAR Dec 29, 2023
5a18743
runs-on: self-hosted
PedroRegisPOAR Dec 29, 2023
50d276e
Testando ambiente
PedroRegisPOAR Dec 29, 2023
900b631
Testando ambiente
PedroRegisPOAR Dec 29, 2023
319c556
Testando ambiente
PedroRegisPOAR Dec 29, 2023
eb07b6e
Testando ambiente
PedroRegisPOAR Dec 29, 2023
e590713
Testando ambiente
PedroRegisPOAR Dec 29, 2023
2885188
Testando ambiente
PedroRegisPOAR Dec 29, 2023
1a9354c
Testando ambiente
PedroRegisPOAR Dec 29, 2023
e49b77c
Testando ambiente
PedroRegisPOAR Dec 29, 2023
b82e139
Testando ambiente
PedroRegisPOAR Dec 29, 2023
64ee160
WIP: github-runner funciona
PedroRegisPOAR Jan 3, 2024
decb76c
Testa --privileged
PedroRegisPOAR Jan 3, 2024
e0b9738
Testa --privileged
PedroRegisPOAR Jan 3, 2024
5c4dd19
Testa --privileged
PedroRegisPOAR Jan 3, 2024
3c7454a
Testa outros metadados do ambiente
PedroRegisPOAR Jan 3, 2024
c0f7aa5
Testa docker build Dockerfile
PedroRegisPOAR Jan 3, 2024
b1b6a4e
Pequenos ajustes
PedroRegisPOAR Jan 3, 2024
50a152e
Testa GNU hello
PedroRegisPOAR Jan 3, 2024
f31f930
Testa python39
PedroRegisPOAR Jan 3, 2024
fe1ae72
Testa free proveniente do pacote procps
PedroRegisPOAR Jan 3, 2024
c78fe2e
Volta para nixpkgs 22.11
PedroRegisPOAR Jan 4, 2024
4235e37
Refactor
PedroRegisPOAR Jan 4, 2024
a4cc0d1
Super atualização 22.11 -> 23.11 + VNC
PedroRegisPOAR Jan 10, 2024
32fbaaa
Super atualização 22.11 -> 23.11 + VNC
PedroRegisPOAR Jan 10, 2024
ba13697
Super atualização 22.11 -> 23.11 + VNC, 3
PedroRegisPOAR Jan 10, 2024
fb08840
Remove overlay não usado
PedroRegisPOAR Jan 15, 2024
9caab68
Reduz RAM e número de cores
PedroRegisPOAR Jan 16, 2024
afcf7be
Corrige comando de executar a VM
PedroRegisPOAR Jan 16, 2024
bf0fafe
Adiciona TODO
PedroRegisPOAR Jan 17, 2024
12c362d
Ajusta histórico
PedroRegisPOAR Jan 17, 2024
129819e
nc -vz localhost 3001
PedroRegisPOAR Jan 17, 2024
26f7fb9
Muda ordem do teste do docker
PedroRegisPOAR Jan 17, 2024
84d7a17
Resolve race condition, hopefully
PedroRegisPOAR Jan 18, 2024
bd5b344
Remove atributo antigo
PedroRegisPOAR Jan 18, 2024
62d1549
Deletes k8s helpers examples
PedroRegisPOAR Jan 18, 2024
93ccd57
Salva no remoto
PedroRegisPOAR Jan 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 31 additions & 0 deletions .github/workflows/test-kaniko.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: 🧪 Test building with Kaniko

on:
workflow_dispatch:

jobs:
build:
runs-on: [kaniko-worker]
container:
image: gcr.io/kaniko-project/executor:debug
permissions:
contents: read
packages: write

steps:
- name: Build and push container test
run: |
# Write config file
AUTH=$(echo -n ${{ github.actor }}:${{ secrets.GITHUB_TOKEN }} | base64)
echo "{\"auths\": {\"ghcr.io\": {\"auth\": \"${AUTH}\"}}}" > /kaniko/.docker/config.json

# Configure git
export GIT_USERNAME="kaniko-bot"
export GIT_PASSWORD="${{ secrets.GITHUB_TOKEN }}"

# Build and push
/kaniko/executor --dockerfile="./images/ubi9.Dockerfile" \
--context="${{ github.repositoryUrl }}#${{ github.ref }}#${{ github.sha }}" \
--destination="ghcr.io/some-natalie/kubernoodles/kaniko-build:test" \
--push-retry 5 \
--image-name-with-digest-file /workspace/image-digest.txt
74 changes: 53 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,69 @@
name: tests

on:
push:
branches:
- main
pull_request:
branchs:
- 'feature/**'
- 'fix/**'
- 'refactor/**'
on: workflow_dispatch
# on:
# push:
# branches:
# - main
# pull_request:
# branchs:
# - 'feature/**'
# - 'fix/**'
# - 'refactor/**'


jobs:
test:
runs-on: self-hosted
runs-on: arc-runner-set
# runs-on: self-hosted
name: Testes
steps:
- name: checkout PR merge commit
uses: actions/checkout@v3

- name: Rodar um echo
run: echo 'teste'
- name: Executa um echo
run: echo 'Olá mundo!'

- name: Executa docker do host
- name: Metadatas
run: |
# sudo apt-get install -y podman
docker pull alpine
docker images
cat /etc/os*release
# cat /etc/group
uname -a
id
pwd
ls -alh
nproc
free -h
# sudo id
cat $HOME/logs.txt || true
echo FOO-BAR > $HOME/logs.txt

- name: Testes sobre docker
run: |
# env | sort
# touch /dev/kvm
# which docker
# readlink -f $(which docker)
docker --version
# sudo docker info
docker info
docker images
docker run --rm alpine cat /etc/os-release
docker images

- name: Run alpine OCI image with docker and metadatas
- name: Testes sobre docker build
run: |
docker run alpine cat /etc/os*release
cat /etc/os*release
uname -a
nix flake metadata nixpkgs
id
docker build --tag custom-python .
docker images

- name: Testes sobre /dev/kvm
run: |
id
docker run --privileged=true --rm \
alpine sh -c 'id && touch /dev/kvm && stat /dev/kvm'

- name: Mais metadados
run: |
nix flake --version
nix flake metadata nixpkgs
32 changes: 32 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM python:3.9-slim-buster


# Set python environment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1
ENV PIP_NO_CACHE_DIR 0
ENV PIP_DISABLE_PIP_VERSION_CHECK 1

ENV USER app_user

WORKDIR /home/app_user

RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get install --no-install-recommends --no-install-suggests -y \
ca-certificates \
&& apt-get -y autoremove \
&& apt-get -y clean \
&& rm -rf /var/lib/apt/lists/*

RUN addgroup app_group \
&& adduser \
--quiet \
--disabled-password \
--shell /bin/bash \
--home /home/app_user \
--gecos "User" app_user \
--ingroup app_group \
&& chmod 0700 /home/app_user \
&& chown --recursive app_user:app_group /home/app_user

CMD ["/bin/bash"]
Loading