-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add all the docs * fix linebreaks * fix a few links * note on dev branch * spelling * fix tabs * address PR comments by Tyler * fix docs readme markup * fix inlining on the whole directory-tree * prettify docker instructions add a whale, etc. * reorganize /docs/readme.md sections * use table for dependency references * refactor and reference whitepapers * move process and guidelines to wiki * refactor readme front * add link to Orion to root readme as well * use plain links * not on scala * add fancy discord linker to readme * less lines by removing db from tree * add more introductory text * validate all readme frontpage links by linking to dev branch * add youtube video that now has slides * deploy and terraform readme cleanups * fix diagram inclusions * redirect links from feature to dev branch
- Loading branch information
1 parent
8e930a6
commit d2dc33f
Showing
10 changed files
with
129 additions
and
107 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
Ensure | ||
|
||
``` | ||
Host * | ||
StrictHostKeyChecking no | ||
``` | ||
|
||
Host * | ||
StrictHostKeyChecking no | ||
Present in `~/.ssh/config` before running pssh commands. | ||
|
||
Present in ~/.ssh/config before running pssh commands | ||
|
||
|
||
Using GCP Compute instances temporarily instead of Kubernetes due to low entropy bug | ||
We're using GCP Compute instances temporarily instead of Kubernetes due to low entropy bug. | ||
|
||
Workflow: | ||
|
||
create-cluster-from-snapshot.sh <num-machines> <node-label> for bringing up machines | ||
`create-cluster-from-snapshot.sh <num-machines> <node-label>` | ||
|
||
for bringing up machines | ||
|
||
update-hosts.sh <hosts-file> <node-label> | ||
`update-hosts.sh <hosts-file> <node-label>` | ||
|
||
redeploy.sh <hosts-file> <node-label> | ||
`redeploy.sh <hosts-file> <node-label>` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,22 @@ | ||
### Architecture documentation | ||
## Architecture documentation | ||
### Diagrams | ||
#### ledger architecture | ||
![ | ||
from /docs/images/architecture-diagrams/ledger-architecture.png | ||
]( | ||
https://github.com/Constellation-Labs/constellation/blob/dev/docs/images/architecture-diagrams/ledger-architecture.png | ||
) | ||
|
||
https://github.com/Constellation-Labs/constellation/blob/developer/nikolaj/add-docs/docs/images/architecture-diagrams/ledger-architecture.png | ||
#### node-architecture | ||
![ | ||
from /docs/images/architecture-diagrams/node-architecture.png | ||
]( | ||
https://github.com/Constellation-Labs/constellation/blob/dev/docs/images/architecture-diagrams/node-architecture.png | ||
) | ||
|
||
https://github.com/Constellation-Labs/constellation/blob/developer/nikolaj/add-docs/docs/images/architecture-diagrams/node-architecture.png | ||
|
||
https://github.com/Constellation-Labs/constellation/blob/developer/nikolaj/add-docs/docs/images/architecture-diagrams/protocol-data-flow-sketch.png | ||
|
||
(todo: turn all images to proper links with alt text and add explainer for all the diagrams) | ||
|
||
(trial: [[link-to-image.png|alt=protocol-data-flow-sketch]]) | ||
#### protocol-data-flow-sketch | ||
![ | ||
from /docs/images/architecture-diagrams/protocol-data-flow-sketch.png | ||
]( | ||
https://github.com/Constellation-Labs/constellation/blob/dev/docs/images/architecture-diagrams/protocol-data-flow-sketch.png | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,19 +2,19 @@ | |
### :computer: On Linux and Mac | ||
1. Check out the repository | ||
|
||
```haskell | ||
```bash | ||
git clone [email protected]:Constellation-Labs/constellation.git | ||
``` | ||
|
||
2. From root directory `constellation`, run | ||
|
||
```haskell | ||
```bash | ||
./build.sh | ||
``` | ||
|
||
or optionally (to connect to other host) | ||
|
||
```haskell | ||
```bash | ||
./build.sh seedhost:port | ||
``` | ||
|
||
|
@@ -33,13 +33,13 @@ Note: *For now this installation is not covered here in detail.* | |
2. Follow directions for building for development. | ||
3. Run | ||
|
||
```haskell | ||
```bash | ||
sbt docker:publishLocal | ||
``` | ||
|
||
4. Run | ||
|
||
```haskell | ||
```bash | ||
./run-local-docker.sh | ||
``` | ||
|
||
|
@@ -52,7 +52,7 @@ This is **deprecated** but may be useful for people running Windows, etc.: | |
|
||
1. Download [vagrant](https://www.vagrantup.com). | ||
2. Run | ||
```haskell | ||
```bash | ||
vagrant up | ||
``` | ||
from project directory. See also | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,34 @@ | ||
### On design choices | ||
|
||
This file summarizes current resoning for our approach and design decissions, | ||
reviews and references. Please communicate suggestions by making a thread on the | ||
[community portal Orion](https://orion.constellationlabs.io/accounts/login/?next=/) | ||
or approaching the developers on the | ||
[discord](https://discordapp.com/invite/KMSmXbV) | ||
server. | ||
reviews and references. | ||
|
||
Many decissions can be traced back to the fundamental goal to provide and | ||
accessible, scalable protocol that focuses on solving the consensus task. | ||
For a cursory glipse into the core teams perspectives, you may check out the following clips: | ||
|
||
* [youtube.com/constellation-labs/talk-at-Tech-Crunch](https://youtu.be/SsYZF4msXuQ) (Aug. 2018, 40 mins) | ||
* [youtube.com/constellation-labs/testnet-overview](https://youtu.be/xjn6Te7Twg4) (Sept. 2018, 22 mins) | ||
|
||
#### on architecture | ||
* [youtube.com/constellation-labs/talk-at-Tech-Crunch](https://youtu.be/fCscJL3_tdU) (Oct. 2018, 28 mins) | ||
* [youtube.com/constellation-labs/testnet-overview](https://youtu.be/SsYZF4msXuQ) (Aug. 2018, 22 mins) | ||
|
||
#### Why scala? | ||
There are some general notes on Scala and also on other functional programming languages actively used for crypto projects in the | ||
[/wiki/Comparisons-to-other-protocols](https://github.com/Constellation-Labs/constellation/wiki/Comparisons-to-other-protocols#fast_forward-projects-using-a-functional-language-approach). | ||
|
||
(tbd) | ||
One motivating factor as language of choice for the reference implementation of the protocol was of course the core teams experience with it, as well as the useful packages like akka actors and apache spark on the Java virtual machine (JVM). The constellation code base also makes extensive use of the type hierarchy features. In fact, the para-protocol approach to dApp integration builds on it. | ||
|
||
#### on recommended-frameworks | ||
#### On architecture | ||
|
||
(tbd) | ||
For diagrams, see | ||
[/docs/architecture.md](https://github.com/Constellation-Labs/constellation/blob/dev/docs/architecture.md). | ||
|
||
#### on dependencies | ||
#### Feedback | ||
|
||
(tbd) | ||
Please communicate suggestions by making a thread on the | ||
[community portal Orion](https://orion.constellationlabs.io/accounts/login/?next=/) | ||
or approaching the developers on the | ||
[discord](https://discordapp.com/invite/KMSmXbV) | ||
server: | ||
|
||
<a href="https://discordapp.com/invite/KMSmXbV"> | ||
<img src="https://img.shields.io/badge/chat-discord-brightgreen.svg"/> | ||
</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,15 @@ | ||
### Tools and frameworks to work with the Constellation protocol | ||
#### Options | ||
|
||
(todo: plaintext explainations of what we use and short note on alternatives): | ||
|
||
#### Core team | ||
|
||
(todo: plaintext explainations of what we use): | ||
|
||
* [wikipedia/Docker_(software)](https://en.wikipedia.org/wiki/Docker_(software)) | ||
* [wikipedia/Vagrant_(software)](https://en.wikipedia.org/wiki/Vagrant_(software)) | ||
* [wikipedia/Docker](https://en.wikipedia.org/wiki/Docker_(software)) | ||
* [wikipedia/Vagrant](https://en.wikipedia.org/wiki/Vagrant_(software)) | ||
* [wikipedia/Google_Cloud_Platform](https://en.wikipedia.org/wiki/Google_Cloud_Platform) | ||
* [wikipedia/Terraform](https://en.wikipedia.org/wiki/Terraform_(software)) | ||
* [circleci.com/docs/](https://circleci.com/docs/) | ||
* ... | ||
|
||
(tbd) | ||
|
||
For a discussion, see: | ||
#### Discussion | ||
See | ||
|
||
* [/docs/design-choices.md](https://github.com/Constellation-Labs/constellation/docs/design-choices.md) | ||
* [/docs/design-choices.md](https://github.com/Constellation-Labs/constellation/blob/dev/docs/design-choices.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,61 @@ | ||
## Setup | ||
Some steps specific to GCP (Google Cloud Platform). For other platforms, this will require changes. | ||
|
||
(Some steps specific to GCP, requires changes for other platforms) | ||
|
||
```bash | ||
brew install terraform | ||
brew install jq | ||
``` | ||
|
||
### Credentials | ||
|
||
Locally, make sure this environment variable is set to your google credentials file: | ||
```export GOOGLE_APPLICATION_CREDENTIALS=${path to your file}``` | ||
[Create and download a new credentials json](https://console.developers.google.com/apis/credentials?organizationId=802489480189&project=esoteric-helix-197319) | ||
Use your own GCP project (if running a test node outside Constellation org) | ||
If you don't have a service account, make one with compute engine access, | ||
otherwise, make a new credentials json file by creating a new service account key and download it to your local machine | ||
|
||
```bash | ||
export GOOGLE_APPLICATION_CREDENTIALS=${path to your file} | ||
``` | ||
|
||
### SSH USER | ||
Use your own GCP project (if running a test node outside Constellation org). | ||
If you don't have a service account, make one with compute engine access. Otherwise, make a new credentials json file by creating a new service account key and download it to your local machine. | ||
Here is how to create and download a new credentials json: | ||
[Link to Google Cloud API/Credentials](https://console.developers.google.com/apis/credentials?organizationId=802489480189&project=esoteric-helix-197319). | ||
|
||
MAKE SURE YOU HAVE EXECUTED | ||
### SSH USER | ||
*Make sure you have the following exectued, otherwise you will break the cluster!* | ||
|
||
```bash | ||
ssh-add ~/.ssh/id_rsa | ||
``` | ||
|
||
Otherwise you will break the cluster! | ||
Terraform requires agent forwarding to pick up the keys, it will break the machines due to overwhelming `sshd` slots. | ||
|
||
Terraform requires agent forwarding to pick up the keys, it will break the machines due to overwhelming sshd slots | ||
By default, the terraform command will ask for the ssh user to use. | ||
If you'd prefer to avoid answering this every time, you can set the TF_VAR_ssh_user env variable. | ||
|
||
By default, the terraform command will ask for the ssh user to use. If you'd prefer to avoid answering this every time, you can set the TF_VAR_ssh_user env variable. | ||
```export TF_VAR_ssh_user=${USER}``` is probably what you want. | ||
```bash | ||
export TF_VAR_ssh_user=${USER} | ||
``` | ||
|
||
is probably what you want. | ||
|
||
#Initialize | ||
|
||
### Initialize | ||
```bash | ||
cd to terraform/default | ||
|
||
(or copy paste and change settings, make sure to change terraform.backend.prefix in main.tf) | ||
``` | ||
|
||
or copy paste and change settings, make sure to change terraform.backend.prefix in `main.tf`. | ||
|
||
If you have a pre-existing state already (after copying folder with new name), say 'no' when the prompt asks to copy the state | ||
|
||
and then run | ||
If you have a pre-existing state already (after copying folder with new name), say 'no' when the prompt asks to copy the state. And then run | ||
|
||
```bash | ||
terraform init # to setup plugins | ||
|
||
terraform show # to see existing state (or if it's a new folder should return empty) | ||
``` | ||
|
||
### Usage | ||
Something something terraform apply / terraform destroy | ||
|
||
terraform show # after the cluster is online | ||
_Something something terraform apply / terraform destroy_ | ||
|
||
to verify it's working. | ||
```bash | ||
terraform show # after the cluster is online, to verify it's working | ||
|
||
./ips_to_hosts_file.sh # to grab ips | ||
``` |