From ade231a2e63808578e07432c8c69b9b8ae257322 Mon Sep 17 00:00:00 2001 From: David Dollar Date: Thu, 30 Jan 2020 10:52:07 -0500 Subject: [PATCH] wip --- install/.gitignore | 3 -- install/README.md | 11 +------ install/aws/README.md | 27 ---------------- install/aws/main.tf | 41 ------------------------ install/azure/README.md | 18 ----------- install/azure/main.tf | 40 ------------------------ install/do/README.md | 28 ----------------- install/do/main.tf | 69 ----------------------------------------- install/gcp/README.md | 36 --------------------- install/gcp/main.tf | 26 ---------------- install/local/README.md | 67 --------------------------------------- install/local/main.tf | 20 ------------ 12 files changed, 1 insertion(+), 385 deletions(-) delete mode 100644 install/.gitignore delete mode 100644 install/aws/README.md delete mode 100644 install/aws/main.tf delete mode 100644 install/azure/README.md delete mode 100644 install/azure/main.tf delete mode 100644 install/do/README.md delete mode 100644 install/do/main.tf delete mode 100644 install/gcp/README.md delete mode 100644 install/gcp/main.tf delete mode 100644 install/local/README.md delete mode 100644 install/local/main.tf diff --git a/install/.gitignore b/install/.gitignore deleted file mode 100644 index 9fa2e71..0000000 --- a/install/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -.terraform -*.tfstate* -terraform.tfvars diff --git a/install/README.md b/install/README.md index 099c42a..631cb3a 100644 --- a/install/README.md +++ b/install/README.md @@ -1,12 +1,3 @@ # Convox Installer -Convox uses [Terraform](https://www.terraform.io/) for installation. - -Go into the relevant subdirectory of this repository and follow the instructions in the README - -| Cloud Provider | Subdirectory | -| :------------------ | :------------- | -| Amazon Web Services | [aws](aws) | -| Digital Ocean | [do](do) | -| Google Cloud | [gcp](gcp) | -| Microsoft Azure | [azure](azure) | +Installation instructions have been moved [to the docs](../docs/production-rack) diff --git a/install/aws/README.md b/install/aws/README.md deleted file mode 100644 index d4f9bf8..0000000 --- a/install/aws/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Convox on AWS - -## Initial Setup - -- Create an IAM user with the `AdministratorAccess` policy -- Create Access Credentials for this IAM user -- Note these credentials - -## Configuration - -### Environment Variables - -- `AWS_DEFAULT_REGION` (required) -- `AWS_ACCESS_KEY_ID` (required) -- `AWS_SECRET_ACCESS_KEY` (required) - -## Install Convox - -- Clone this repository and switch to the directory containing this `README` -- Run `terraform init` -- Run `terraform apply` - -## Convox CLI Setup - -- [Install the Convox CLI](../../docs/guides/installation/cli.md) -- Run `export RACK_URL=$(terraform output rack_url)` -- Run `convox rack` to ensure that your CLI is connected to your new Rack \ No newline at end of file diff --git a/install/aws/main.tf b/install/aws/main.tf deleted file mode 100644 index 467567a..0000000 --- a/install/aws/main.tf +++ /dev/null @@ -1,41 +0,0 @@ -variable "name" { - description = "rack name" - default = "convox" -} - -variable "node_type" { - description = "machine type of the cluster nodes" - default = "t3.small" -} - -variable "release" { - description = "convox release version to install" - default = "" -} - -variable "region" { - description = "aws region in which to install the rack" - default = "us-east-1" -} - -provider "aws" { - version = "~> 2.22" - - region = var.region -} - -module "system" { - source = "../../terraform/system/aws" - - name = var.name - node_type = var.node_type - release = var.release - - providers = { - aws = aws - } -} - -output "rack_url" { - value = module.system.api -} diff --git a/install/azure/README.md b/install/azure/README.md deleted file mode 100644 index 904e9d7..0000000 --- a/install/azure/README.md +++ /dev/null @@ -1,18 +0,0 @@ -# Convox Rack on Azure - -## Initial Setup - -- [Install the Azure CLI](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli?view=azure-cli-latest) -- Run `az login` - -## Install Convox - -- Clone this repository and switch to the directory containing this `README` -- Run `terraform init` -- Run `terraform apply` - -## Convox CLI Setup - -- [Install the Convox CLI](../../docs/guides/installation/cli.md) -- Run `export RACK_URL=$(terraform output rack_url)` -- Run `convox rack` to ensure that your CLI is connected to your new Rack diff --git a/install/azure/main.tf b/install/azure/main.tf deleted file mode 100644 index a8c0aac..0000000 --- a/install/azure/main.tf +++ /dev/null @@ -1,40 +0,0 @@ -variable "name" { - description = "rack name" - default = "convox" -} - -variable "node_type" { - description = "machine type of the cluster nodes" - default = "Standard_D2_v3" -} - -variable "release" { - description = "convox release version to install" - default = "" -} - -variable "region" { - description = "region in which to install the rack" - default = "eastus" -} - -provider "azurerm" { - version = "~> 1.37" -} - -module "system" { - source = "../../terraform/system/azure" - - providers = { - azurerm = azurerm - } - - name = var.name - node_type = var.node_type - release = var.release - region = var.region -} - -output "rack_url" { - value = module.system.api -} diff --git a/install/do/README.md b/install/do/README.md deleted file mode 100644 index 8518877..0000000 --- a/install/do/README.md +++ /dev/null @@ -1,28 +0,0 @@ -# Convox on Digital Ocean - -## Initial Setup - -- Log in to your Digital Ocean Dashboard -- Go to https://cloud.digitalocean.com/account/api/tokens -- Generate a new **Personal Access Token** and **Spaces Access Key** -- Note these credentials - -## Configuration - -### Template Variables - -- `access_id` (required) -- `secret_key` (required) -- `token` (required) - -## Install Convox - -- Clone this repository and switch to the directory containing this `README` -- Run `terraform init` -- Run `terraform apply` - -## Convox CLI Setup - -- [Install the Convox CLI](../../docs/guides/installation/cli.md) -- Run `export RACK_URL=$(terraform output rack_url)` -- Run `convox rack` to ensure that your CLI is connected to your new Rack diff --git a/install/do/main.tf b/install/do/main.tf deleted file mode 100644 index 4115244..0000000 --- a/install/do/main.tf +++ /dev/null @@ -1,69 +0,0 @@ -variable "access_id" { - description = "spaces access id" - type = string -} - -variable "name" { - description = "rack name" - default = "convox" -} - -variable "node_type" { - description = "machine type of the cluster nodes" - default = "s-1vcpu-2gb" -} - -variable "release" { - description = "convox release version to install" - default = "" -} - -variable "region" { - description = "region in which to install the rack" - default = "nyc3" -} - -variable "registry_disk" { - description = "size of the registry disk volume" - default = "50Gi" -} - -variable "secret_key" { - description = "spaces secret key" - type = string -} - -variable "token" { - description = "digital ocean api token" - type = string -} - -provider "digitalocean" { - version = "~> 1.11" - - token = var.token - - spaces_access_id = var.access_id - spaces_secret_key = var.secret_key -} - -module "system" { - source = "../../terraform/system/do" - - access_id = var.access_id - name = var.name - node_type = var.node_type - release = var.release - region = var.region - registry_disk = var.registry_disk - secret_key = var.secret_key - token = var.token - - providers = { - digitalocean = digitalocean - } -} - -output "rack_url" { - value = module.system.api -} diff --git a/install/gcp/README.md b/install/gcp/README.md deleted file mode 100644 index 20722d4..0000000 --- a/install/gcp/README.md +++ /dev/null @@ -1,36 +0,0 @@ -# Convox Rack on GCP - -## Initial Setup - -- Go to your GCP Dashboard -- Create a new project -- Note the ID of the project -- Go to https://console.cloud.google.com/apis/credentials/serviceaccountkey -- Ensure you have your new project selected from the dropdown -- Select **New Service Account** -- Give it a name like `terraform` -- Give it the **Project Owner** role -- Select key type **JSON** -- Click **Create** -- Download the credential file - -## Configuration - -### Environment Variables - -- `GOOGLE_CREDENTIALS` (path or contents of the credentials file) -- `GOOGLE_PROJECT` (project id in which to install) -- `GOOGLE_REGION` (required) - -## Install Convox - -- Clone this repository and switch to the directory containing this `README` -- Run `terraform init` -- Run `terraform apply -target module.system.module.project` to enable necessary services in your project -- Run `terraform apply` - -## Convox CLI Setup - -- [Install the Convox CLI](../../docs/guides/installation/cli.md) -- Run `export RACK_URL=$(terraform output rack_url)` -- Run `convox rack` to ensure that your CLI is connected to your new Rack diff --git a/install/gcp/main.tf b/install/gcp/main.tf deleted file mode 100644 index 178096d..0000000 --- a/install/gcp/main.tf +++ /dev/null @@ -1,26 +0,0 @@ -variable "name" { - description = "rack name" - default = "convox" -} - -variable "node_type" { - description = "machine type of the cluster nodes" - default = "n1-standard-1" -} - -variable "release" { - description = "convox release version to install" - default = "" -} - -module "system" { - source = "../../terraform/system/gcp" - - name = var.name - node_type = var.node_type - release = var.release -} - -output "rack_url" { - value = module.system.api -} diff --git a/install/local/README.md b/install/local/README.md deleted file mode 100644 index ee8bbcd..0000000 --- a/install/local/README.md +++ /dev/null @@ -1,67 +0,0 @@ -# Convox on Local Workstation - -## Initial Setup - -### MacOS - -- Install [Docker Desktop](https://www.docker.com/products/docker-desktop) -- Go to Docker Desktop Preferences -- Go to the Advanced tab -- Drag the CPU slider to the halfway point -- Drag the Memory slider to at least 8GB -- Go to the Kubernetes tab -- Enable Kubernetes - -### Ubuntu - -- `snap install microk8s --classic --channel=1.13/stable` -- `microk8s.enable dns storage` -- `mkdir -p ~/.kube` -- `microk8s.config > ~/.kube/config` -- `sudo snap restart microk8s` - -## Install Convox - -- Clone this repository and switch to the directory containing this `README` -- Run `terraform init` -- Run `terraform apply` - -## DNS Setup - -Set `*.convox` to be resolved by the local Rack's DNS server. - -### MacOS - -- `sudo mkdir -p /etc/resolver` -- `sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/convox'` - -### Ubuntu - -- `sudo mkdir -p /usr/lib/systemd/resolved.conf.d` -- `sudo bash -c "printf '[Resolve]\nDNS=$(kubectl get service/resolver-external -n convox-system -o jsonpath="{.spec.clusterIP}")\nDomains=~convox' > /usr/lib/systemd/resolved.conf.d/convox.conf"` -- `systemctl daemon-reload` -- `systemctl restart systemd-networkd systemd-resolved` - -## CA Trust (optional) - -To remove browser warnings about untrusted certificates for local applications -you can trust the Rack's CA certificate. - -This certificate is generated on your local machine and is unique to your Rack. - -### MacOS - -- `kubectl get secret/ca -n convox-system -o jsonpath="{.data.tls\.crt}" | base64 -d > /tmp/ca` -- `sudo security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain /tmp/ca` - -### Ubuntu - -- `kubectl get secret/ca -n convox-system -o jsonpath="{.data.tls\.crt}" | base64 -d > /tmp/ca` -- `sudo mv /tmp/ca /usr/local/share/ca-certificates/convox.crt` -- `sudo update-ca-certificates` - -## Convox CLI Setup - -- [Install the Convox CLI](../../docs/guides/installation/cli.md) -- Run `export RACK_URL=$(terraform output rack_url)` -- Run `convox rack` to ensure that your CLI is connected to your new Rack \ No newline at end of file diff --git a/install/local/main.tf b/install/local/main.tf deleted file mode 100644 index 3caa230..0000000 --- a/install/local/main.tf +++ /dev/null @@ -1,20 +0,0 @@ -variable "name" { - description = "rack name" - default = "convox" -} - -variable "release" { - description = "convox release version to install" - default = "" -} - -module "system" { - source = "../../terraform/system/local" - - name = var.name - release = var.release -} - -output "rack_url" { - value = module.system.api -}