-
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
40b02ce
commit b5591b9
Showing
9 changed files
with
94 additions
and
95 deletions.
There are no files selected for viewing
34 changes: 17 additions & 17 deletions
34
docs/manual/04_host/03_devopsDeployment/03_DOSetup/01_DOKS.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,25 +1,25 @@ | ||
## Create DO Kubernetes cluster with four nodepools | ||
# Create DO Kubernetes cluster with four nodepools | ||
You will first need to create a DO Kubernetes cluster cluster to be able to install the EE onto it. There are three different ways in DO with which you can create a kubernetes cluster, these are as following. | ||
* Using DO CLI called ```doctl```. | ||
* Using DO API | ||
* Using DO Control Panel | ||
- Using DO CLI called `doctl`. | ||
- Using DO API | ||
- Using DO Control Panel | ||
|
||
To create a DO cluster with DO CLI you will have to do the following. | ||
* Install the Digital Ocean CLI called ```doctl``` using the instructions mentioned [here](https://docs.digitalocean.com/reference/doctl/how-to/install/). | ||
* Create a new Personal Access Token (PAT). You can follow the instructions mentioned [here](https://docs.digitalocean.com/reference/api/create-personal-access-token/) | ||
* Run command ```doctl auth init``` and provide the PAT generated above to grant access to ```doctl``` | ||
* Next run the following command | ||
```doctl kubernetes cluster create <name> --version <version> --region <region>```. This will create a cluster in the region of your choise. This will automatically create a Virtual Private Cloud or VPC for you while the cluster creates. There are other flags that you can give to this command and you can look at all those flags [here](https://docs.digitalocean.com/reference/doctl/reference/kubernetes/cluster/create/). | ||
- Install the Digital Ocean CLI called `doctl` using the instructions mentioned [here](https://docs.digitalocean.com/reference/doctl/how-to/install/). | ||
- Create a new Personal Access Token (PAT). You can follow the instructions mentioned [here](https://docs.digitalocean.com/reference/api/create-personal-access-token/) | ||
- Run command `doctl auth init` and provide the PAT generated above to grant access to `doctl` | ||
- Next run the following command | ||
`doctl kubernetes cluster create \<name> --version \<version> --region \<region>`. This will create a cluster in the region of your choise. This will automatically create a Virtual Private Cloud or VPC for you while the cluster creates. There are other flags that you can give to this command and you can look at all those flags [here](https://docs.digitalocean.com/reference/doctl/reference/kubernetes/cluster/create/). | ||
|
||
Once the cluster is up and ready you can start adding node pools to it. | ||
|
||
#### create the main nodepool | ||
You will have to create a nodepool where the API and other key services/pods of the Ethereal Engine will be residing. To create a new noodpool go to to your newly created [kubernetes cluster](https://cloud.digitalocean.com/kubernetes/clusters). Go to Cluster -> Resources -> Add a Node Pool. You can give it a name like ```np-main``` and recommended size is ```General Purpose - 2vCPU 8 GB RAM```, but you could always alter the size based on your needs. Once that is done we also would need to enable autoscaling, you can do that by ticking the box called ```Autoscale``` and then setting the Minimum Nodes to 3 and Maximum Nodes to 10. After adding these settings click the ```Add Node Pool(s)``` button at the bottom and it should take a few minutes and the nodepool should be created. | ||
## create the main nodepool | ||
You will have to create a nodepool where the API and other key services/pods of the Ethereal Engine will be residing. To create a new noodpool go to to your newly created [kubernetes cluster](https://cloud.digitalocean.com/kubernetes/clusters). Go to Cluster -> Resources -> Add a Node Pool. You can give it a name like `np-main` and recommended size is `General Purpose - 2vCPU 8 GB RAM`, but you could always alter the size based on your needs. Once that is done we also would need to enable autoscaling, you can do that by ticking the box called `Autoscale` and then setting the Minimum Nodes to 3 and Maximum Nodes to 10. After adding these settings click the `Add Node Pool(s)` button at the bottom and it should take a few minutes and the nodepool should be created. | ||
|
||
#### Create nodepool for instanceserver | ||
You will need to create a nodepool where instance servers will be residing. To create a new noodpool on [DO Website](https://cloud.digitalocean.com/kubernetes/clusters), go to Cluster -> Resources -> Add a Node Pool. You can give it a name like ```np-instanceserver``` and set a size, the recommended size is ```CPU Intensive - 2vCPU 4 GB RAM```, but you could always alter the size based on your needs. Once that is done we also would need to enable autoscaling, you can do that by ticking the box called ```Autoscale``` and then setting the Minimum Nodes to 6 and Maximum Nodes to 16. After adding these settings click the ```Add Node Pool(s)``` button at the bottom and it should take a few minutes and the nodepool should be created. | ||
#### Create nodepool for redis | ||
In Ethereal Engine deployemnt, the Redis deployment gets its own nodepool. To create a new noodpool on [DO Website](https://cloud.digitalocean.com/kubernetes/clusters), go to Cluster -> Resources -> Add a Node Pool. You can give it a name like ```np-redis``` and set a size, the recommended size is ```CPU Intensive - 2vCPU 4 GB RAM```, but you could always alter the size based on your needs. Once that is done we also would need to enable autoscaling, you can do that by ticking the box called ```Autoscale``` and then setting the Minimum Nodes to 3 and Maximum Nodes to 6. After adding these settings click the ```Add Node Pool(s)``` button at the bottom and it should take a few minutes and the nodepool should be created. | ||
## Create nodepool for instanceserver | ||
You will need to create a nodepool where instance servers will be residing. To create a new noodpool on [DO Website](https://cloud.digitalocean.com/kubernetes/clusters), go to Cluster -> Resources -> Add a Node Pool. You can give it a name like `np-instanceserver` and set a size, the recommended size is `CPU Intensive - 2vCPU 4 GB RAM`, but you could always alter the size based on your needs. Once that is done we also would need to enable autoscaling, you can do that by ticking the box called `Autoscale` and then setting the Minimum Nodes to 6 and Maximum Nodes to 16. After adding these settings click the `Add Node Pool(s)` button at the bottom and it should take a few minutes and the nodepool should be created. | ||
## Create nodepool for redis | ||
In Ethereal Engine deployemnt, the Redis deployment gets its own nodepool. To create a new noodpool on [DO Website](https://cloud.digitalocean.com/kubernetes/clusters), go to Cluster -> Resources -> Add a Node Pool. You can give it a name like `np-redis` and set a size, the recommended size is `CPU Intensive - 2vCPU 4 GB RAM`, but you could always alter the size based on your needs. Once that is done we also would need to enable autoscaling, you can do that by ticking the box called `Autoscale` and then setting the Minimum Nodes to 3 and Maximum Nodes to 6. After adding these settings click the `Add Node Pool(s)` button at the bottom and it should take a few minutes and the nodepool should be created. | ||
|
||
#### create nodepool for builder | ||
We would need to create a new nodepool for running the builder job. To create a new noodpool on [DO Website](https://cloud.digitalocean.com/kubernetes/clusters), go to Cluster -> Resources -> Add a Node Pool. You can give it a name like ```np-builder``` and set a size, the recommended size is ```Basic - 8vCPU 16 GB RAM```, but you could always alter the size based on your needs. We do not need to enable autoscaling for the builder node as we normally are aware of the computational requirnments the build job would need and we could always resize it if the need arises, plus this nodepool is not load intensive. After adding these settings click the ```Add Node Pool(s)``` button at the bottom and it should take a few minutes and the nodepool should be created. | ||
## create nodepool for builder | ||
We would need to create a new nodepool for running the builder job. To create a new noodpool on [DO Website](https://cloud.digitalocean.com/kubernetes/clusters), go to Cluster -> Resources -> Add a Node Pool. You can give it a name like `np-builder` and set a size, the recommended size is `Basic - 8vCPU 16 GB RAM`, but you could always alter the size based on your needs. We do not need to enable autoscaling for the builder node as we normally are aware of the computational requirnments the build job would need and we could always resize it if the need arises, plus this nodepool is not load intensive. After adding these settings click the `Add Node Pool(s)` button at the bottom and it should take a few minutes and the nodepool should be created. |
6 changes: 3 additions & 3 deletions
6
docs/manual/04_host/03_devopsDeployment/03_DOSetup/02_DOCR.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,5 +1,5 @@ | ||
## Create DOCR for build images | ||
To create a ditial ocean container registry, on the [DO Website](https://cloud.digitalocean.com), in the left nav bar, you could click on the ```Container Registry``` and then create a new Container Registry. You can name it as you like but the convention that we have been following will be ```etherealengine```. This container registry will be used to store the Ethereal Engine specific docker images. You can get the DOCR URL from the created container registry which should look something similar to ```registry.digitalocean.com/etherealengine``` and would be used in the code to push images to DOCR. | ||
# Create DOCR for build images | ||
To create a ditial ocean container registry, on the [DO Website](https://cloud.digitalocean.com), in the left nav bar, you could click on the `Container Registry` and then create a new Container Registry. You can name it as you like but the convention that we have been following will be `etherealengine`. This container registry will be used to store the Ethereal Engine specific docker images. You can get the DOCR URL from the created container registry which should look something similar to `registry.digitalocean.com/etherealengine` and would be used in the code to push images to DOCR. | ||
Along with the DOCR URL, to communicate to the DOCR, you would need to create an API token which can then be used inside the code. To create the token, go to API -> Tokens > Create New Token, give the token a meaningful name and set the expiry, also give the token the required rights. For DOCR, you will have to give it full Read & Write permissions. Once created, you could save this token and use it in the code. | ||
|
||
```Note:``` Unlike the AWS ECR, we do not need to explicitly create the repositories for different categories of images, when a request is sent to DOCR with the repository name, it checks if the repository exists, otherwise it creates the repository on the run time. | ||
:::Note: Unlike the AWS ECR, we do not need to explicitly create the repositories for different categories of images, when a request is sent to DOCR with the repository name, it checks if the repository exists, otherwise it creates the repository on the run time. |
10 changes: 5 additions & 5 deletions
10
docs/manual/04_host/03_devopsDeployment/03_DOSetup/03_DatabaseCluster.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,7 +1,7 @@ | ||
## Create a Database Cluster | ||
On the [DO Website](https://cloud.digitalocean.com), you could see a button, most probably on the top right end called Create and it is with a dropdown. You can select ```Databases``` from the drop down and it should take you the the page where you can create the Database Cluster. On create Database cluster you can choose the datacentre region and then choose a database engine. We could choose any SQL database but at the time being with the Digital Ocean clsuter we choose the ```MySQL```. | ||
You can choose the pricing tier that works for you from various configurations that are available. Then give your database clsuter a unique name and select project that you want the cluster to be created in and finally click the ```Create Database Cluster``` button at the bottom to be able to create the database clsuter. It should take a few minutes and after that your Cluster should be ready to host the databases. | ||
DO Provides extenisve loging and monitoring for your queries running agains the created datbase clsuter which can be viewed under the ```Logs & Queries``` section. You can also get the connection credentials from the main menu and also manage the users under the ```Users & Databases``` section. You can also update the Settings/configurations of the created database cluster from the same menu. | ||
# Create a Database Cluster | ||
On the [DO Website](https://cloud.digitalocean.com), you could see a button, most probably on the top right end called Create and it is with a dropdown. You can select `Databases` from the drop down and it should take you the the page where you can create the Database Cluster. On create Database cluster you can choose the datacentre region and then choose a database engine. We could choose any SQL database but at the time being with the Digital Ocean clsuter we choose the `MySQL`. | ||
You can choose the pricing tier that works for you from various configurations that are available. Then give your database clsuter a unique name and select project that you want the cluster to be created in and finally click the `Create Database Cluster` button at the bottom to be able to create the database clsuter. It should take a few minutes and after that your Cluster should be ready to host the databases. | ||
DO Provides extenisve loging and monitoring for your queries running agains the created datbase clsuter which can be viewed under the `Logs & Queries` section. You can also get the connection credentials from the main menu and also manage the users under the `Users & Databases` section. You can also update the Settings/configurations of the created database cluster from the same menu. | ||
|
||
### Access and Connecting to the DO Database Cluster | ||
## Access and Connecting to the DO Database Cluster | ||
Your DO database clsuter is Public by default but you can always change that setting as per your own requirnments. Also, Digital Ocean creates a VPC along with your Database cluster to offer the ability to be able to connect to the cluster more securily. |
32 changes: 16 additions & 16 deletions
32
docs/manual/04_host/03_devopsDeployment/03_DOSetup/04_agonesNginxRedis.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,49 +1,49 @@ | ||
## Installing Agones, ingress-nginx, and redis for each deployment | ||
# Installing Agones, ingress-nginx, and redis for each deployment | ||
You can download the Kubeconfig file from the Digital Ocean Control pannel's Kubernetes cluster section and get that added into the kubectl configurations. | ||
|
||
You next need to add the Agones, ingress-nginx, and redis Helm charts to helm by running | ||
```helm repo add agones https://agones.dev/chart/stable```, ```helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx```, and ```helm repo add redis https://charts.bitnami.com/bitnami```. | ||
You should also at this time add Ethereal Engine's repo via ```helm repo add etherealengine https://helm.etherealengine.org```. | ||
`helm repo add agones https://agones.dev/chart/stable`, `helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx`, and `helm repo add redis https://charts.bitnami.com/bitnami`. | ||
You should also at this time add Ethereal Engine's repo via `helm repo add etherealengine https://helm.etherealengine.org`. | ||
|
||
If you ever suspect that a chart is out-of-date, run ```helm repo update``` to update all of them to the latest. | ||
If you ever suspect that a chart is out-of-date, run `helm repo update` to update all of them to the latest. | ||
|
||
### Install Agones | ||
From the top level of this repo, run ```helm install -f </path/to/agones-default-values.yaml> agones agones/agones```. | ||
## Install Agones | ||
From the top level of this repo, run `helm install -f \</path/to/agones-default-values.yaml> agones agones/agones`. | ||
This says to install a service called 'agones' from the 'agones' package in the 'agones' chart, and to configure it with | ||
[agones-default-values.yaml](https://github.com/EtherealEngine/ethereal-engine-ops/blob/master/configs/agones-default-values.yaml) that can be found in [ethereal-engine-ops](https://github.com/EtherealEngine/ethereal-engine-ops) repo. | ||
|
||
### Install redis for each deployment | ||
## Install redis for each deployment | ||
|
||
Each deployment of Ethereal Engine uses a redis cluster for coordinating the 'feathers-sync' library. | ||
Each redis deployment needs to be named the same as the deployment that will use it; for an | ||
Ethereal Engine deployment named 'dig', the corresponding redis deployment would need to be named | ||
'dig-redis'. | ||
|
||
Run ```helm install -f </path/to/redis-values.yaml> <RELEASE_NAME>-redis redis/redis``` to install, e.g. | ||
```helm install -f </path/to/redis-values.yaml> dev-redis redis/redis```. | ||
Run `helm install -f \</path/to/redis-values.yaml> \<RELEASE_NAME>-redis redis/redis` to install, e.g. | ||
`helm install -f \</path/to/redis-values.yaml> dev-redis redis/redis`. | ||
|
||
> [redis-values.yaml](https://github.com/EtherealEngine/ethereal-engine-ops/blob/master/configs/redis-values.yaml) can be found in [ethereal-engine-ops](https://github.com/EtherealEngine/ethereal-engine-ops) repo. | ||
If you named the redis something other than 'np-redis', you'll have to alter the value in | ||
`redis-values.yaml` in two places to your redis nodepool name. | ||
in your `redis-values.yaml` file, you will also update the Key value to `doks.digitalocean.com/node-pool`. | ||
If you didn't create a nodepool just for redis, you must omit the ` -f </path/to/redis-values.yaml> `, | ||
If you didn't create a nodepool just for redis, you must omit the ` -f \</path/to/redis-values.yaml> `, | ||
as that config makes redis pods run on a specific nodepool. | ||
|
||
### Install ingress-nginx | ||
## Install ingress-nginx | ||
Open local version of [nginx-ingress-aws-values.yml](https://github.com/EtherealEngine/ethereal-engine-ops/blob/master/configs/nginx-ingress-aws-values.yml) file. Remove the aws specific values under the `annotation` sections and add the following DO sepcific values in there. | ||
|
||
```service.beta.kubernetes.io/do-loadbalancer-certificate-id: <Certificate-ID> | ||
service.beta.kubernetes.io/do-loadbalancer-protocol: https | ||
```service.beta.kubernetes.io/do-loadbalancer-certificate-id: \<Certificate-ID> | ||
service.beta.kubernetes.io/do-loadbalancer-protocol: https | ||
``` | ||
|
||
You can run the following command with `doctl` and it should give you the <Certificate-ID> against the for the certificate that you must already have added via the DO domains. | ||
```doctl compute certificate list``` | ||
You can run the following command with `doctl` and it should give you the \<Certificate-ID> against the for the certificate that you must already have added via the DO domains. | ||
`doctl compute certificate list` | ||
Get the ID and replace it in the values.yaml file as suggested above. | ||
|
||
Do not commit this file with the ARN inserted; once you've completed this step, revert the file back | ||
to the state it was committed in. | ||
|
||
From the top level of this repo, run ```helm install -f </path/to/nginx-ingress-aws-values.yml> nginx ingress-nginx/ingress-nginx``` | ||
From the top level of this repo, run `helm install -f \</path/to/nginx-ingress-aws-values.yml> nginx ingress-nginx/ingress-nginx` | ||
This says to install a service called 'nginx' from the 'ingress-nginx' package in the 'ingress-nginx' chart, and to configure it with | ||
a file found at [nginx-ingress-aws-values.yml](https://github.com/EtherealEngine/ethereal-engine-ops/blob/master/configs/nginx-ingress-aws-values.yml). |
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,2 +1,2 @@ | ||
#### DO Spaces Object Storage | ||
# DO Spaces Object Storage | ||
You will need to created Space Object Storage (SOS) to be able to store your static files that then could be served via the API pods. Go to [DO Website](https://cloud.digitalocean.com) and on the left hand side click on the `Spaces Object Storage` and create an SOS by giving it the right region and a valid name. Also make sure that you check the `Enable CDN` checkbox to enable the Content Delivery Network for faster delivery of the static content. |
Oops, something went wrong.