Giter Site home page Giter Site logo

kmoberg / okctl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oslokommune/okctl

0.0 1.0 0.0 42.79 MB

Opinionated and effortless infrastructure and application management

Home Page: https://okctl.io

License: Other

Makefile 0.31% Go 98.75% CSS 0.09% HTML 0.09% Dockerfile 0.05% Python 0.70% Shell 0.02%

okctl's Introduction

Contributor Covenant codecov Security Rating Vulnerabilities Go Report Card Nightly build

okctl - Opinionated and effortless infrastructure and application management

okctl

Installation

To download the latest release, run the command matching your operating system:

# Linux
curl --silent --location "https://github.com/oslokommune/okctl/releases/latest/download/okctl_$(uname -s)_amd64.tar.gz" | tar xz -C /tmp
sudo mv /tmp/okctl /usr/local/bin

# macOS
brew tap oslokommune/tap
brew install oslokommune/tap/okctl

Getting started

The following is a guide for how to create an environment that contains the elements described in Compare and contrast.

1. Create a new GitHub repository

Go to github.com/oslokommune and create a new private or internal git repository. No credentials are stored in this repository, we want it private as a precaution until we are certain it is safe to have it set as public.

ℹ️ This repository will be used by okctl to store infrastructure-as-code, which means files containing various configuration for your up-and-coming cluster.

Now, run:

# Clone the repository you just made
$ git clone [email protected]:oslokommune/<the new repository>.git
$ cd <the new repository>

2. Create a cluster

A "cluster" is a Kubernetes cluster with many addons and integrations, creating a production grade environment as described in Functionality.

You will soon be running okctl apply cluster, which will ask you for the following information:

  • Username and password: This is your Oslo Kommune AD organization username (e.g., oooXXXXX) and its password.
  • Multi factor token (MFA): The same one you use to login to AWS. If you haven't set up MFA yet, you can do that here.
  • AWS account ID: This identifies which account you want to use. You can see which accounts you have access to just after logging in to AWS:

okctl

# Scaffold a cluster. Format:
okctl scaffold cluster -f cluster.yaml
# <edit cluster.yaml>
okctl apply cluster -f cluster.yaml

Follow the instructions.

When done, verify that you have a working cluster by running

$ okctl venv -c cluster.yaml
$ kubectl get service

The last command should show something like

NAME         TYPE        CLUSTER-IP   EXTERNAL-IP   PORT(S)   AGE
kubernetes   ClusterIP   10.100.0.1   <none>        443/TCP   1h

Common commands

# Get help for any command
$ okctl --help

# Show credentials for cluster
$ okctl show credentials -c cluster.yaml

# Run a sub shell with environment variables from the above command and a custom command prompt (PS1)
$ okctl venv -c cluster.yaml

# Delete the cluster
$ okctl delete cluster -c cluster.yaml

Functionality

The core cluster is up and running, and we are currently working on building a seamless experience on top of this cluster with integrations for common functionality:

Core cluster

Application lifecycle

  • Postgres for creating and integrating a postgres database with your application
  • Amazon Elastic Container Registry for creating and assisting with the publication of container images for use in the cluster
  • Reference application that demonstrates how to use the cluster and its integrations

Compare and contrast

The intended purpose of okctl is to be an opinionated solver of infrastructure problems, this includes setting up CI/CD pipelines et al.

The following table is not present to determine what tool is better or worse, but rather how these tools compare to okctl and the problems we are focused on solving.

okctl eksctl kubectl serverless.tf
Defines a CI/CD scheme
Creates a Kubernetes cluster
Facilitates with application creation
Integrates with Github (actions, packages, oauth)
Sets up monitoring

Inspiration

We have begged, borrowed and stolen various ideas from the following CLIs:

okctl's People

Contributors

paulbes avatar ivaruf avatar dependabot[bot] avatar yngvark avatar deifyed avatar frankorigo avatar kielo87 avatar eide avatar bsek avatar fredriv avatar olovholm avatar

Watchers

James Cloos 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.