Git Product home page Git Product logo

picloud's Introduction

picloud

  • Automated image creation with FAI
  • Automated bare metal installation with PXE boot or USB boot
  • Automated Kubernetes installation and management with k3s
  • Expose services to the Internet securely without static IP or port forwarding using Cloudflare Tunnel
  • GitLab installation and many utilities
  • Distributed block storage system with Longhorn
  • Kubernetes cluster logging with Loki
  • Registry as a pull through cache with Docker Registry
  • Terraform HTTP backend and manage your environment on GitLab (see Terraform HTTP backend)
  • Harbor installation for private Docker registry
  • Virtual machine management with VirtualBox

Installation

curl https://raw.githubusercontent.com/qtvhao/picloud/main/pic -o pic && chmod +x pic

Or run with Docker (limited functions):

docker build -t pic https://github.com/qtvhao/picloud.git
docker run -it -v ~/.ssh/:/root/.ssh/ pic bash
docker run -it -v ~/.ssh/:/root/.ssh/ pic ./pic list-nodename $IDENTITY_FILE

Build then burn your ISO with FAI (Fully Automated Installation)

asciicast2

your_github_username="qtvhao" # this helps to get public key from your Github account, you can ssh to created machine without password
./pic fai "your_picloud" "$your_github_username"
./pic dd "$host_name" "/dev/sdc" # "disk dump" your ISO to USB device, or use PXE boot to install your machine (see below)

Automated bare metal installation with PXE boot

asciicast

./pic pxe "8c:dc:d4:34:0c:f0" ./id_rsa "192.168.1.226"
# 
./pic auto-pxe $IDENTITY_FILE # this will automatically discover all machines in the same network and install them with created ISO above

Discover machines

PiCloud will automatically discover all machines which can be authenticated with given identity file. This is useful for managing a large number of machines.

asciicast3

./pic list-nodename ./id_rsa

List all machines in the same network and their IP addresses, includes product name and installed date.

Install/Reinstall Kubernetes cluster with k3s

The script will automatically install k3s-agent on the listed machines.

./pic reinstall-k3s "$IDENTITY_FILE"

Install recommended packages

Firstly, PiCloud will discover all machines with given identity file. Then, it will install k3s on all machines and setup a Kubernetes cluster. Finally, it will install all recommended packages on the master node. It also expose all services to the internet securely with Cloudflare Tunnel.

./pic recommended "$IDENTITY_FILE"
# This following steps will be executed/installed:
# - Install K3s
# - Redis
# - Gitlab
# - Grafana, Promtail and Loki
# - Longhorn storage

Setup Registry as a pull through cache (useful for air-gapped environment)

./pic Registry-as-a-pull-through-cache "$IDENTIFY_FILE" "$NODE_IP"

Usage

Usage: ./pic [command]
Commands:
  update
  install
  remove
  start
  stop
  restart
  status
  help

picloud's People

Contributors

qtvhao avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  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.