human readme edit

This commit is contained in:
armistace 2025-07-22 22:11:54 +10:00
parent 8e744d96fa
commit e7c2802c10
6 changed files with 112 additions and 4 deletions

View File

@ -0,0 +1,60 @@
name: Build and Push Image
on:
push:
branches:
- master
jobs:
build:
name: Build and push image
runs-on: ubuntu-latest
container: catthehacker/ubuntu:act-latest
if: gitea.ref == 'refs/heads/master'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Create Kubeconfig
run: |
mkdir $HOME/.kube
echo "${{ secrets.KUBEC_CONFIG_BUILDX }}" > $HOME/.kube/config
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: kubernetes
driver-opts: |
namespace=gitea-runner
qemu.install=true
- name: Login to Docker Registry
uses: docker/login-action@v3
with:
registry: git.aridgwayweb.com
username: armistace
password: ${{ secrets.REG_PASSWORD }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: .
push: true
platforms: linux/amd64,linux/arm64
tags: |
git.aridgwayweb.com/armistace/mcpo:latest
- name: Deploy
run: |
echo "Installing Kubectl"
apt-get update
apt-get install -y apt-transport-https ca-certificates curl gnupg
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.33/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
chmod 644 /etc/apt/keyrings/kubernetes-apt-keyring.gpg
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.33/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list
chmod 644 /etc/apt/sources.list.d/kubernetes.list
apt-get update
apt-get install kubectl
kubectl delete namespace mcpo
kubectl create namespace mcpo
kubectl apply -f kube/pod.yaml && kubectl apply -f kube/deployment.yaml && kubectl apply -f kube/service.yaml

2
.gitignore vendored
View File

@ -1 +1,3 @@
.venv* .venv*
.aider*
.env

View File

@ -1,6 +1,6 @@
# Gitea MCP Project # MCPO Project
This repository contains the source code, configuration files, and deployment instructions for a project that uses Docker, Kubernetes, and the `mcpo` tool to manage a Gitea MCP (Multi-Component Protocol) service. This repository contains the source code, configuration files, and deployment instructions for a project that uses Docker, Kubernetes, and the `mcpo` tool to manage mulitiple MCP (Multi-Component Protocol) service.
## Overview ## Overview
@ -13,7 +13,7 @@ The project sets up:
### Docker ### Docker
- **Dockerfile**: Builds a container with Python dependencies and the `mcpo` tool - **Dockerfile**: Builds a container with Python dependencies and the `mcpo` tool
- **gitea_mcp_set.sh**: Script to configure the container environment - **gitea_mcp_set.sh**: Script to configure gitea_mcp in the container environment
- **requirements.txt**: Python dependencies for any script-based components - **requirements.txt**: Python dependencies for any script-based components
### Kubernetes ### Kubernetes
@ -30,7 +30,7 @@ The project sets up:
## Purpose ## Purpose
This project provides a complete environment to: This project provides a complete environment to:
1. Run the Gitea MCP service using containerization 1. Run the mpco service using containerization
2. Orchestrate the service using Kubernetes 2. Orchestrate the service using Kubernetes
3. Manage configuration and authentication securely 3. Manage configuration and authentication securely

22
kube/deployment.yaml Normal file
View File

@ -0,0 +1,22 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: mcpo-deployment
labels:
app: mcpo
namespace: mcpo
spec:
replicas: 3
selector:
matchLabels:
app: mcpo
template:
metadata:
labels:
app: mcpo
spec:
containers:
- name: mcpo
image: git.aridgwayweb.com/armistace/mcpo:latest
ports:
- containerPort: 8000

11
kube/pod.yaml Normal file
View File

@ -0,0 +1,11 @@
apiVersion: v1
kind: Pod
metadata:
name: mcpo
namespace: mcpo
spec:
containers:
- name: mcpo
image: git.aridgwayweb.com/armistace/mcpo:latest
ports:
- containerPort: 8000

13
kube/service.yaml Normal file
View File

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: mcpo-service
namespace: mcpo
spec:
type: NodePort
selector:
app: mcpo
ports:
- port: 80
targetPort: 8000
nodePort: 30026