From d5bf69c201525995208683c3155ea774422eafa9 Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Tue, 7 Jul 2020 17:21:18 -0500 Subject: [PATCH 1/2] chore: update docs for Kubernetes-based host --- src/assets/img/docs/architecture-overview.png | Bin 11492 -> 0 bytes src/pages/docs/contributing/repositories.md | 7 ++- src/pages/docs/overview/architecture.md | 10 ++-- src/pages/docs/overview/why-codius.md | 4 +- .../docs/running-a-host/host-architecture.md | 13 ++--- src/pages/docs/running-a-host/why.md | 2 +- .../docs/using-codius/running-the-examples.md | 52 +++++++----------- src/pages/docs/using-codius/writing-an-app.md | 6 +- 8 files changed, 37 insertions(+), 57 deletions(-) delete mode 100644 src/assets/img/docs/architecture-overview.png diff --git a/src/assets/img/docs/architecture-overview.png b/src/assets/img/docs/architecture-overview.png deleted file mode 100644 index e8495c59e88022332760a44d868a1b7e3f18ee45..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11492 zcmch7cUV*3wr#8^h}h^qKzax10#ZauLNC%yPkS@K0ihxLy0HK3Q zGgKjgKp^lIo_p>&_q_Ao_x^bI=KBK4&faU!wf3BIjXB1At*fm@NzOnHfj}r>P-T4x zA=6U9!jwL7r-mv)U6!D>(U^o8P0R;5?0kK#hP9=r%oGPz>^vCQ2;Vyg9#usqHBhP-#l z(F5a^$=;*g`qjKL*LwJBc}Y^lH-8n4);I7oP~B%2C@%b^qf^P9NSkcVf&Za^T6 zJgAdFKZVQENC%iTJbt?s?h~}(d=~Qj15>2smxmiB3xmYzi3^a>oBwjrxFYL0$cOX) zI{w8+8^Un?rzio~BGOw!hG~f|ck)X-``iI;n2GmuD8ZcffcyV}~?;pKrW#(Mjq+!s=Ffw;qgEZOFh6)P$! zIk5He+Sz#g`C6H~yZgrN;KRM)&d$zsDYx18Cj;KNp)4b?_dbB&x<1=#&dJHi#3z>~_OmB&T_xJbPPE^?}JtbqlRppBPB^5H3LO?XL zGO_m$4u;?-ohnFEI`aDq5m8Z5@?$-He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9*2C%5{ z;cwsGQ1ctr04eGYp@%!?Pz5!A_i+--MNEc5$kBUHYk`g` zRnV-b3mWgh3KpGI_Mi!cOH2&s^w(<{DnEL2OA%ofW=qn`FraN)1vIavE8lSOZ0i!v@1-c>w9I5+YS5oPwu>@pCNtFGt7W zQK*C}*Dc7GA+N{|mWLc7^86$NVnIpYS*4{2sYEdk@hgdO}KPO3KT zjhp~y9$r&4A4~$-6_8R3^EW_CAdNI+_<4s0cL^G1+*rPL#5oA$e2+1!V3KEe>1iJX zdI8Zpo9u<+f!QG2eg?I`(DjGo1DUh!2T( zf>C{uSvM0ZQbK3VdWqRkf7qaimrwFk$83hV{vKeo&v2!#iV-#5H4|1dy1P-=b>LQx znn2c(eUpbkSP2nAhjr#DrIkYmLZ*dK{n}CrUj|M&-=6LE1W#>@Ua7(qzHR)Mx2akZ z3yi3VmTSd0CE%M-v7DnYfBP%zXCPOoUut|!No08DqUt;5VIkVy-|W&P^nl)3iVHNO zMQwntT*dpZV?80k?mfh82Q}20Q~z+gfBi(-JN7M8xUI9YYjg4wOhsF{T.com --token=""`` You should get a response that looks something like this: ``` -{ url: - 'http://MANIFEST_HASH.local.codius.org:3000/', - manifestHash: 'oooiikrql23xkjhvc6gobe7vjf5tiprodtmphqnwm7v3vx5g2csq', - host: 'http://local.codius.org:3000', - expiry: '2018-06-05T20:52:02.068Z', - expirationDate: '06-05-2018 1:52:02 -0700', - expires: 'a few seconds ago', - pricePaid: '4' } +service.core.codius.org/nginx-codius-pod created ``` -Notice the `url` field in the response. You can use this url to query the pod you just launched, and it should return the standard nginx welcome page. +If you get the following error, you can change the file's `metadata.name` field and retry: +``` +Error from server (AlreadyExists): error when creating "nginx.yaml": services.core.codius.org "nginx-codius-pod" already exists +``` + +Notice the `nginx-codius-pod` in the response. You can use this as a subdomain on the host to query the pod you just launched (`https://nginx-codius-pod.example-host.com`), and it should return the standard nginx welcome page. -## [create-react-app](https://github.com/codius/codius-examples/blob/master/manifest/create-react-app-manifest.json) +## [create-react-app](https://github.com/codius/codius-examples/blob/master/react-app.yaml) -Another available example pod launches the bootstrap React App, [create-react-app](https://github.com/codius/examples/blob/master/manifest/create-react-app-manifest.json) +Another available example pod launches the bootstrap React App, [create-react-app](https://github.com/codius/examples/blob/master/react-app.yaml) -* ``cd codius-examples/manifest/`` -* ``codius upload ./create-react-app-manifest.json --host https://codius.feraltc.com`` +* ``cd codius-examples/`` +* ``KUBECONFIG=none kubectl create -f ./react-app.yaml -s https://.com --token=""`` As before, you should get a similar response: ``` -{ url: - 'https://MANIFEST_HASH.codius.feraltc.com/', - manifestHash: 'MANIFEST_HASH', - host: 'https://codius.feraltc.com', - expiry: '2018-06-05T20:52:02.068Z', - expirationDate: '06-05-2018 1:52:02 -0700', - expires: 'a few seconds ago', - pricePaid: '4' } +service.core.codius.org/my-codius-create-react-app created ``` - -Feel free to test these examples with some of the other hosts that the Codius team are running: - -* `https://codius.justmoon.com` -* `https://codius.tinypolarbear.com` -* `https://codius.risky.business` -* `https://codius.andros-connector.com` diff --git a/src/pages/docs/using-codius/writing-an-app.md b/src/pages/docs/using-codius/writing-an-app.md index 6be83dc..909a982 100644 --- a/src/pages/docs/using-codius/writing-an-app.md +++ b/src/pages/docs/using-codius/writing-an-app.md @@ -6,10 +6,10 @@ section: docs # Writing a Codius application Codius applications are nothing more than everyday NodeJS packages. The structure -of an applicatoin is fairly straightforward: +of an application is fairly straightforward: -* A [manifest](https://github.com/coilhq/codius-manifest) describing basic information about your program, such as name, verison, image, and its environment variables. +* A [manifest](https://godoc.org/github.com/codius/codius-crd-operator/api/v1alpha1#Service) describing basic information about your program, such as name, version, image, and its environment variables. -The main component from which your program will be sourced is a Docker image, the path to which can be found in the `manifest` object in a field called `image`. By default, the image is pulled from Dockerhub. +The main component from which your program will be sourced is a Docker image, the path to which can be found in the `containers` object(s) in a field called `image`. By default, the image is pulled from [Docker Hub](https://hub.docker.com/). Codius also has a number of [example applications](running-the-examples) available. From 2aed8eece4b51a1204adb09e137bd88725223182 Mon Sep 17 00:00:00 2001 From: Brandon Wilson Date: Mon, 10 Aug 2020 17:01:35 -0500 Subject: [PATCH 2/2] chore: remove kubectl and codius-auth --- src/pages/docs/contributing/repositories.md | 2 +- src/pages/docs/overview/architecture.md | 4 +- .../docs/running-a-host/host-architecture.md | 2 +- .../docs/using-codius/running-the-examples.md | 47 +++++-------------- src/pages/docs/using-codius/writing-an-app.md | 2 +- 5 files changed, 16 insertions(+), 41 deletions(-) diff --git a/src/pages/docs/contributing/repositories.md b/src/pages/docs/contributing/repositories.md index 9693102..20f370a 100644 --- a/src/pages/docs/contributing/repositories.md +++ b/src/pages/docs/contributing/repositories.md @@ -18,7 +18,7 @@ Codius is made up of the following major repositories: * [codius-operator](https://github.com/codius/codius-operator) * [codius-web](https://github.com/codius/codius-web) -* [codius-auth](https://github.com/codius/codius-auth) +* [receipt-verifier](https://github.com/coilhq/receipt-verifier) ## Making Changes diff --git a/src/pages/docs/overview/architecture.md b/src/pages/docs/overview/architecture.md index 18f0b7c..88abe03 100644 --- a/src/pages/docs/overview/architecture.md +++ b/src/pages/docs/overview/architecture.md @@ -15,8 +15,8 @@ Previously, most distributed applications in the cryptocurrency community were w Codius is a hosting platform. We generally distinguish two roles: -* **Codius Hosts** are companies or individuals who are looking to earn money by operating servers to host other people's applications. They use several components ([`codius-operator`](https://github.com/codius/codius-operator), [`codius-web`](https://github.com/codius/codius-web), [`codius-auth`](https://github.com/codius/codius-auth)) in a Kubernetes cluster in order to accept [Interledger](https://interledger.org) payments and provide the necessary APIs for uploading apps. `codius-operator` also creates a [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod/) and the necessary amount of [containers](https://www.docker.com/what-container). +* **Codius Hosts** are companies or individuals who are looking to earn money by operating servers to host other people's applications. They use several components ([`receipt-verifier`](https://github.com/coilhq/receipt-verifier), [`codius-operator`](https://github.com/codius/codius-operator) and [`codius-web`](https://github.com/codius/codius-web)) in a Kubernetes cluster in order to accept [Interledger](https://interledger.org) payments and provide the necessary APIs for uploading apps. `codius-operator` also creates a [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod/) and the necessary amount of [containers](https://www.docker.com/what-container). -* **Developers** create applications and deploy them to a Codius host. They use [`kubectl`](https://kubernetes.io/docs/reference/kubectl/overview/) to upload apps to the host's Kubernetes cluster. The upload is accomplished via a [manifest](https://godoc.org/github.com/codius/codius-crd-operator/api/v1alpha1#Service) that describes information about the program such as its name, version, environment variables, and a Docker image to pull. (Images are pulled from [Docker Hub](https://hub.docker.com/) by default.) +* **Developers** create applications and deploy them to a Codius host. They use the Codius host's [`web page`](https://github.com/codius/codius-web) to upload apps to the host's Kubernetes cluster. The upload is accomplished via a [manifest](https://godoc.org/github.com/codius/codius-operator/servers#Services) that describes information about the program such as its environment variables and Docker image to pull. (Images are pulled from [Docker Hub](https://hub.docker.com/) by default.) By default, [ `codius-operator`](https://github.com/codius/codius-operator) utilizes [`Kata Containers`](https://katacontainers.io/) in order to run applications isolated from each other and from the outside world. diff --git a/src/pages/docs/running-a-host/host-architecture.md b/src/pages/docs/running-a-host/host-architecture.md index 5fec2d9..bf8e843 100644 --- a/src/pages/docs/running-a-host/host-architecture.md +++ b/src/pages/docs/running-a-host/host-architecture.md @@ -7,7 +7,7 @@ section: docs A Codius host is comprised of several components that allows it to perform its duties of hosting code in an isolated manner. The main roles a Codius host plays is to create a space where each program that is uploaded can live and to receive payments. ## Hosting -The main function of the Codius host is to create a place to run uploaded code, and then proxy connections to the uploaded code through itself. A host receives uploaded code in the form of a [manifest](https://godoc.org/github.com/codius/codius-crd-operator/api/v1alpha1#Service). The manifest contains information about the code such as its name, version, Docker image, and environment variables. The host generates a hash from the uploaded manifest. The hash is used to identify the manifest to the host and by extension, the outside world. The manifest defines a Kubernetes [custom resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) which the [codius-operator](https://github.com/codius/codius-operator) uses to manage pods. +The main function of the Codius host is to create a place to run uploaded code, and then proxy connections to the uploaded code through itself. A host receives uploaded code in the form of a [manifest](https://godoc.org/github.com/codius/codius-operator/servers#Service). The manifest contains information about the code such as its Docker image and environment variables. The host generates a hash from the uploaded manifest. The hash is used to identify the manifest to the host and by extension, the outside world. The manifest defines a Kubernetes [custom resource](https://kubernetes.io/docs/concepts/extend-kubernetes/api-extension/custom-resources/) which the [codius-operator](https://github.com/codius/codius-operator) uses to manage pods. ### Pods A [pod](https://kubernetes.io/docs/concepts/workloads/pods/pod/) creates a small hardware-isolated unit of computing that groups together [containers](https://www.docker.com/what-container) within it. Containers that share a pod all share the same network, kernel, and storage, but are otherwise isolated from each other. A manifest file can describe multiple containers to be run in the pod that the Codius Host provisions for it. diff --git a/src/pages/docs/using-codius/running-the-examples.md b/src/pages/docs/using-codius/running-the-examples.md index ceb0bd6..cb6843c 100644 --- a/src/pages/docs/using-codius/running-the-examples.md +++ b/src/pages/docs/using-codius/running-the-examples.md @@ -3,48 +3,23 @@ title: Running the Examples section: docs --- -# Installing the CLI +# Example Services -In order to upload programs to Codius hosts, you'll need to install the [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/) CLI. +Codius has a number of [example services](https://github.com/codius/examples) to help you get started. -# Pay the Codius Host - -Navigate to the Codius host in a web browser with a [Web Monetization](https://webmonetization.org/) provider enabled, and note the token. - -# Example Applications - -Codius has a number of example applications to help you get started, which you can acquire by cloning this repo: - -``git clone git://github.com/codius/codius-examples`` +* [nginx](https://github.com/codius/codius-examples/blob/master/nginx.yaml) - a simple nginx server +* [create-react-app](https://github.com/codius/codius-examples/blob/master/react-app.yaml) - the bootstrap React App -## [nginx](https://github.com/codius/codius-examples/blob/master/nginx.yaml) - -The first example is a simple nginx server: - -* ``cd codius-examples/`` -* ``KUBECONFIG=none kubectl create -f ./nginx.yaml -s https://.com --token=""`` - -You should get a response that looks something like this: -``` -service.core.codius.org/nginx-codius-pod created - ``` - -If you get the following error, you can change the file's `metadata.name` field and retry: -``` -Error from server (AlreadyExists): error when creating "nginx.yaml": services.core.codius.org "nginx-codius-pod" already exists -``` +# Pay the Codius Host -Notice the `nginx-codius-pod` in the response. You can use this as a subdomain on the host to query the pod you just launched (`https://nginx-codius-pod.example-host.com`), and it should return the standard nginx welcome page. +Navigate to the Codius host in a web browser with a [Web Monetization](https://webmonetization.org/) provider enabled. -## [create-react-app](https://github.com/codius/codius-examples/blob/master/react-app.yaml) +# Deploy the applicatoin -Another available example pod launches the bootstrap React App, [create-react-app](https://github.com/codius/examples/blob/master/react-app.yaml) +1. Input a name for your service. This is the Codius host's subdomain at which the service will be available. -* ``cd codius-examples/`` -* ``KUBECONFIG=none kubectl create -f ./react-app.yaml -s https://.com --token=""`` +2. Paste the contents of the example service file to the Codius host web page. -As before, you should get a similar response: +3. Click `Deploy`. -``` -service.core.codius.org/my-codius-create-react-app created -``` +If the deployment succeeds, you can visit the service at the chosen subdomain (ex: `https://name.example-host.com`). diff --git a/src/pages/docs/using-codius/writing-an-app.md b/src/pages/docs/using-codius/writing-an-app.md index 909a982..86784a2 100644 --- a/src/pages/docs/using-codius/writing-an-app.md +++ b/src/pages/docs/using-codius/writing-an-app.md @@ -8,7 +8,7 @@ section: docs Codius applications are nothing more than everyday NodeJS packages. The structure of an application is fairly straightforward: -* A [manifest](https://godoc.org/github.com/codius/codius-crd-operator/api/v1alpha1#Service) describing basic information about your program, such as name, version, image, and its environment variables. +* A [manifest](https://godoc.org/github.com/codius/codius-operator/servers#Service) describing basic information about your program, such as its Docker image and environment variables. The main component from which your program will be sourced is a Docker image, the path to which can be found in the `containers` object(s) in a field called `image`. By default, the image is pulled from [Docker Hub](https://hub.docker.com/).