Code Monkey home page Code Monkey logo

edith's Introduction

Edith

A thin self-hostable CI/CD wrapper around Pachyderm/Kubernetes that helps a tiny (1-20 members) startup not think about setting up something as elaborate as Jenkins, ArgoCD and Airflow to keep a cluster delivering value

DISCLAIMER: This tool encapsulates what could be considered "best practices" for... bad practices.

Background:

As a hipster sys-admin developer advocate, lurking on cloud-native, with an M1 macbook, I hit a severe roadblock being unable to build containers for x86_64 for use in cloud environments, most of which wouldn't accept an arm build, to overcome the same, Edith was created as a CI stopgap until docker buildx caught up on m1, along the way, I discovered Metacontroller and Pachyderm and found myself being able to ship infrastructure pieces supafast, I call this pattern Do this, then that or DTTT

If none of this makes sense to you, much to learn you have, young padawan, join me, and together we'll rule the galaxy!

To setup:

Install dependencies with:

npm i

Compile ts to js:

npx tsc

Create an env file with the following:

GITHUB_REPO=
GITHUB_TOKEN=
CONTAINER_REGISTRY=
SLACK_API_KEY=
DOCKERHUB_USERNAME=
DOCKERHUB_PASSWORD=
PUSHBULLET_API_KEY=
BANANA_API_KEY=

Run it with pm2 to auto-restart when updating: npm run pm2

To develop: npm run start

Metacontroller setup

kubectl apply -k https://github.com/metacontroller/metacontroller/manifests/production

TODO

[ ] Support .env

[x] Find a way to compile prior to pm2 restarting the app after update

[x] Delete previous image tags in dockerhub

[x] Upload new container to dockerhub

[ ] Test all the containers under /containers

[x] Blog https://twitter.com/awsgeek/status/1108049045635776512?lang=en

To Restart a Stuck Pipeline

local RED='\e[31m';
  local DEF='\e[0m'

  local name=$1
  pachctl stop pipeline $name
  pachctl list commit __spec__@$name

  commits_to_delete=$(pachctl list commit __spec__@$name --raw  | jq -r "select(.subvenantCommitsSuccess==null) | select(.subvenantCommitsTotal) | .commit.id")
  echo "Commits to delete, please confirm"
  for i in $(echo "$commits_to_delete"); do
    echo $RED $i $DEF
  done
  read confirm

  for i in $(echo "$commits_to_delete"); do
    pachctl delete commit __spec__@$i
  done

  echo "Delete done, start pipeline?"
  read confirm
  pachctl start pipeline $name

edith's People

Contributors

theycallmeloki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.