Skip to content
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
2 changes: 0 additions & 2 deletions .github/CODEOWNERS

This file was deleted.

6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,2 @@
.DS_Store
data
.env
.tf*
.terraform
env.mk
*.kubeconfig
1 change: 0 additions & 1 deletion CNAME

This file was deleted.

76 changes: 0 additions & 76 deletions CODE_OF_CONDUCT.md

This file was deleted.

388 changes: 0 additions & 388 deletions CONTRIBUTING.md

This file was deleted.

18 changes: 0 additions & 18 deletions Makefile

This file was deleted.

106 changes: 59 additions & 47 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,77 +1,89 @@
**Note: This project is a work in progress, expect dragons**. Join our [Matrix room](https://akash.network/chat) if you're interesting in deploying DISCO for production.
# DISCO (Decentralized Infrastructure for Sovereign Computing Operations)

![Disco](disco.png)
This repo helps setup an Akash Provider on your infrastructure so that you can lease out your compute resources in return for Akash tokens.

# DISCO
## Getting Started

Decentralized Infrastructure for Serverless Computing Operations (DISCO) is a secure, scalable, standardized software stack for developing, delivering, and debugging decentralized networks.
To get started you will need to have an Akash account on the network you want to connect your Provider to. You will also need to export your Akash private key with a strong password.

Check out this [announcement](https://techcrunch.com/2017/11/21/overclock-labs-bets-on-kubernetes-to-help-companies-automate-their-cloud-infrastructure) post about DISCO.
_Note:_ Your account should also have a small amount of tokens.

## Getting Started
You will need to install [Ansible](https://docs.ansible.com/ansible/2.9/installation_guide/index.html).

The Akash Provider installation steps are as follows:

1. Manually create 3 virtual machines running any Linux distro and configure SSH access
2. Update the `inventory.yml` in this repo with your variables
3. Run `ansible-playbook -i inventory.yml playbook-kubespray.yml` to setup Kubernetes
4. Run `ansible-playbook -i inventory.yml playbook-akash.yml` to setup an Akash Provider

We will cover each of these 4 steps in more detail below.

### Step 1

We're going to create a 3 node Kubernetes cluster with 1 node being the control plane and 2 kube nodes that will run workloads.

We can expand the 2 kube nodes later on if we want to add more capacity.

In term of minimum hardware requirement:

If you would like to get started using DISCO with some defaults (Packet for servers, Cloudflare for routing), check out our [Getting Started](getting-started.md) guide!
- The 1 x control plane node needs a minimum of 1.5GB ram
- The 2 x kube nodes need a minimum of 1GB each

## The Disco Way
### Step 2

DISCO is a methodology and a framework for deploying modern, scalable and secure services.
This is where we configure the required variables.

- **Composable**: Infrastructure components should be simple to compose. Each service should be functional in design, meaning a well-defined set of inputs and outputs. Services should use declarative formats for setup automation, to minimize time and cost for service operators deploying the project.
- **Configurable**: All configuration variables should be explicitly declared and should be set using operating systems standards (such as Environment variables). Each variable should be well documented.
- **Explicit Dependencies:** Dependencies should be explicitly declared and isolated. Services should never rely on the implicit existence of system-wide packages.
- **Hackable:** Use commonly available scripting frameworks (such as Make) to allow operators to easily make changes. DISCO is entirely made with make.
You'll notice in the `inventory.yml` that we have a section of variables that need to be changed.

## Features
```
envname: CHANGEME # Some cool environment name e.g. myenv
net: mainnet # mainnet / testnet / edgenet
region: CHANGEME # Used for namespacing e.g. myenv.us-east-1.mydomain.com
provider_domain: CHANGEME # A domain name you own e.g. mydomain.com
akash_account_address: CHANGEME # Your address from: akash keys show <key name> -a
akash_key: | # Your Akash private key
-----BEGIN TENDERMINT PRIVATE KEY-----
CHANGEME
-----END TENDERMINT PRIVATE KEY-----
```

DISCO’s secure, scalable and modular design offers below features:
The `envname`, `region` and `provider_domain` are all variables that you control.

- **Kubernetes on Baremetal**: Plug-and-Play Kubernetes with k3s and k3sup on Bare Metal Servers with support of Packet (Join our chat if you’d like us to hook you up with a key).
- **Secure Configuration Store**: DISCO offers configuration DB built on Keybase, an end-to-end encrypted private git repository to securely collaborate with team members and simplify automation.
- **Observability**: DISCO offers observability with Industry-standard cloud-native toolsets such as Prometheus and Graphana.
The `akash_account_address` and `akash_key` need to be set to whatever you have created on the specified `net`.

## Demo
On mainnet you can follow [these instructions](https://docs.akash.network/cli/wallet) to setup an account. You'll also need to [fund your account](https://docs.akash.network/using-akash-tokens/funding) with some tokens.

[![asciicast](https://asciinema.org/a/276427.svg)](https://asciinema.org/a/276427)
Once the account has been created you will need to [export your private key](https://docs.akash.network/cli/wallet#5.-exporting-your-private-keys) with a password.

## Get Started
Be sure to indent your private key under the `akash_key` yaml correctly as shown in the inventory.yml.

To get started, check out [setup guide](getting-started.md)
Also, add the IP addresses of your 3 virtual machines into the `hosts` section.

## Motivation
_Note:_ Step 4 requires you input the password you entered when exporting your private key.

A notable majority of blockchain nodes are deployed on three providers (Amazon, Google, and Microsoft) -- contrary to their values of decentralization. Over [60% of the Ethereum nodes run on Amazon](https://thenextweb-com.cdn.ampproject.org/c/s/thenextweb.com/hardfork/2019/09/23/ethereum-nodes-cloud-services-amazon-web-services-blockchain-hosted-decentralization/amp) alone.
!IMPORTANT! Don't store your private key or password anywhere public.

Our priority at [Akash](https://akash.network) is to help the broader community retain core values without compromising convenience by offering them a platform that's far richer than the cloud providers.
### Step 3

## Layers and Components
Now we use Kubespray to install our cluster.

- [Layer 0](layer0): Bare metal servers on Packet, provisioned using Terraform.
- [Layer 1](layer1): Kubernetes Cluster with Helm, and Container Storage Interfaces (CSI).
- [Layer 2](layer2): Observabilty (Prometheus and Graphana) and Key Management (Vault).
- [Layer 3](layer3): Akash Suite.
- [Layer 4](layer4): Services (Blockchains such as Cosmos Hub and NuCypher)
- [Sanity Check](sanity): Cluster readiness checks for Akash.
Clone the Kubespray repo into the root of this repo with `git clone https://github.com/kubernetes-sigs/kubespray.git`

## Contributing and Roadmap
Then run `ansible-playbook -i inventory.yml playbook-kubespray.yml`

Below is a high-level roadmap planned, checkout [Akash Roadmap](http://akash.network/roadmap) for current progress on the Roadmap. If you’d like to contribute, please check out our contributing guide.
This will take approximately 20 minutes to run depending on the speed of your infrastructure.

### Core
- **SGX Services**: SGX wrappers for Vault, Tendermint, and others. Possibly, generic container wrappers.
- **Kata Containers**: Kata Containers are a secure container runtime with lightweight virtual machines that feel and perform like containers, but provide stronger workload isolation using hardware virtualization technology as a second layer of defense.
- **GitHub Actions**: Integration for CI/CD workflow automation using GitHub actions.
When complete you will have a running Kubernetes cluster.

### Services
- **Cosmos Hub**: Support for deploying Gaia Full node and validators.
- **Interledger Connectors**: Interledger is an open protocol suite for sending payments across different ledgers. Support for deploying Interledger Connectors.
- **NuCypher**: NyCypher provides cryptographic infrastructure for privacy-preserving applications.
- **Your Blockchain?**: If you would like to add your blockchain, get in [touch](http://akash.network/chat).
### Step 4

Finally, to install the Akash provider on our Kubernetes cluster run:

## About the Author
`ansible-playbook -i inventory.yml playbook-akash.yml`

In the past ten years, my focus has been designing, building and managing distributed systems that scale to millions of individuals across the globe. From designing Kaiser’s first cloud platform in 2010 (long before the term “cloud” was coined) to deploying planetary-scale infrastructure at various hyper-growth technology companies in silicon valley.
This command will prompt for your Akash private key password.

I created the [Akash Network](https://akash.network) to help bring that expertise to the masses. Prior to Akash, I co-founded [AngelHack](http://angelhack.com), the world’s largest hackathon organization with over 100,000 developers across 50 cities worldwide and helped launch several developer companies including [Firebase](http://firebase.com) (acquired by Google).
_Note:_ This is the password that you entered when exporting your private key as mentioned in Step 2.

I've been deeply involved with the cloud-native revolution from its nascency as an active open source contributor and have authored libraries adopted by widely adopted organizations such as Ubuntu, HashiCorp, and Kubernetes.
When complete you will now have a running Akash Provider.
4 changes: 0 additions & 4 deletions _config.yml

This file was deleted.

54 changes: 0 additions & 54 deletions common.mk

This file was deleted.

45 changes: 0 additions & 45 deletions db.mk

This file was deleted.

Binary file removed disco.png
Binary file not shown.
Loading