This commit is contained in:
David Dollar 2020-01-30 10:52:07 -05:00
parent 2bcbfe1340
commit ade231a2e6
No known key found for this signature in database
GPG Key ID: AFAF263FB45B2124
12 changed files with 1 additions and 385 deletions

3
install/.gitignore vendored
View File

@ -1,3 +0,0 @@
.terraform
*.tfstate*
terraform.tfvars

View File

@ -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)

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
}

View File

@ -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

View File

@ -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
}