8000 Added some first lessons by sverch · Pull Request #5 · sverch/butter-cloud · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Added some first lessons #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions documentation/quick-start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# Quick Start

> NOTE: This is not how it actually works now, this is just documentation on the
> goal of how it should work eventually.

This example quickstart assumes we have a "control server" running at
`example.com` that clients can register with and provides a web interface for
people to manage their servers. This is based on the way
[Tailscale](https://tailscale.com/) does it.

## 1. Create Account

The first step is to make an account on `example.com`, just like you would for
any other website.

## 2. Install Agent

This will install the client software on your system:

```bash
curl --proto '=https' --tlsv1.2 -sSf https://example.com/installer | sh
```

## 3. Register Agent

This will register the agent with the "control server":

```bash
sudo agent-cli register

Starting agent. Log in at the following URL:

https://example.com/49c27daae021aabf22860b95107e51266fd6e67e
```

## 4. Use Your Cloud Provider

Now, the servers are fully set up, and should be ready to use to create networks
and VMs!

To create a network:

```bash
agent-cli network create my-network 10.0.0.1/24
agent-cli network list
Name Subnet
my-network 10.0.0.1/24
```

To create a VM:

```
agent-cli node create my-node --network my-network --memory 512mb --cpu 1
agent-cli node list
Name Network Address Memory CPUs Status
my-node my-network 10.0.0.2 512mb 1 Running
```

To log into the VM:

```
agent-cli node ssh my-node
...
ubuntu$ pwd
/home/vmuser
```

The website also shows all registered host machines and everything that's
deployed on them.

It can also open web shells to the VMs using
[noVNC](https://novnc.com/info.html), so you can run commands on your VMs from
the browser.
9 changes: 9 additions & 0 deletions lessons/0-introduction/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Cloud Provider Tutorial

This is intended to be a tutorial about how cloud providers work, going step by
step in building one from scratch.

This project should eventually be an easy way to create your cloud provider, so
that this tutorial can be hands on. See the [quick
start](/documentation/quick-start.md), with a description of how this project
should eventually work. The idea is that it should be easy to use.
18 changes: 18 additions & 0 deletions lessons/1-requirements/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Requirements

## Background Knowledge

- Git and git based websites like github.com and gitlab.com. [Try this
tutorial](https://www.w3schools.com/git/default.asp).
- A basic understanding of Virtualization. [Wikipedia has a decent
description](https://en.wikipedia.org/wiki/Virtualization), and there are many
other "what is virtualization" explanations out there.
- A basic understanding of APIs. [Wikipedia also has a decent
description](https://en.wikipedia.org/wiki/API) and there are many good
tutorials out there.

## System Requirements

- A computer with Linux installed. See [this guild for how to install
Ubuntu](https://ubuntu.com/tutorials/install-ubuntu-desktop#1-overview).
- Maybe this can work on Macs someday, but I don't own one.
33 changes: 33 additions & 0 deletions lessons/2-what-is-a-cloud-provider/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# What Is A Cloud Provider?

A cloud provider is a service that allows people to rent compute resources on
demand, such as memory, cpu, and disk.

If a cloud provider just rents out virtual machines, they are more of an
[Infrastructure as a Service
(IaaS)](https://en.wikipedia.org/wiki/Infrastructure_as_a_service) company. If
instead they provide some automation and an easier interface so that you don't
have to manage virtual machines directly, they are more of a [Platform as a
Service (PaaS)](https://en.wikipedia.org/wiki/Platform_as_a_service) company.

Platform as a service companies tend to charge more for the amount of memory,
cpu, and disk you're actually getting, because the idea is you're paying for
their software that handles a lot of the common setup and makes it easier to
accomplish what you're trying to do.

Both IaaS and PaaS companies tend to have APIs, command line tools, and web
interfaces for managing resources you've deployed on their servers.

Here are some examples of cloud providers:

- [Openstack](https://docs.openstack.org/install-guide/)
- [AWS](https://aws.amazon.com/)
- [Google Cloud](https://cloud.google.com/)

Here are some examples of using this project, which is meant to be a simple to
set up cloud provider that you can run on your own machines, and allows you to
create private networks and virtual machines:

```
TODO: When this project actually works, we can add some examples here.
```
0