Skip to content

Commit

Permalink
commiting initial github action pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
angelosnm committed Dec 6, 2024
1 parent 9463d13 commit 88288e7
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Build and Push Docker Image to GHCR

on:
push:
branches:
- main
paths:
- '.github/workflows/docker-build.yml'
- 'docker/**'

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

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GHCR_TOKEN }}

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/tithia/basic:latest
ghcr.io/tithia/basic:${{ github.run_number }}
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ Below command uses the `--user` argument in order to define with which user will
ansible-playbook -i ./infra/spark_inventory.ini --user tithia ./infra/spark.yml
```

## Docker

A specialized container image has been prepared in order to be used by JupyterHub. The relevant content is under the `docker` directory.

```
docker login -u angelosnm -p <token> ghcr.io
```

## Kubernetes (K3s)

#### Download and install the K3s Kubernetes distribution (a lightweight Kubernetes installer for single-node or cluster setups).
Expand Down Expand Up @@ -105,6 +113,14 @@ sudo cat /var/lib/rancher/k3s/server/node-token
curl -sfL https://get.k3s.io | K3S_URL=https://<master-ip>:6443 K3S_TOKEN=<node-token> sh -
```

#### Taint control plane node to prevent pods scheduling
```
kubectl taint nodes tithia-kube-control-plane node-role.kubernetes.io/control-plane:NoSchedule
```




### Metrics-server
```
kubectl apply -f ./kube/metrics-server/metrics-server.yaml
Expand Down

0 comments on commit 88288e7

Please sign in to comment.