Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update documentation for Terraform module use #28

Open
displague opened this issue Dec 17, 2020 · 3 comments
Open

Update documentation for Terraform module use #28

displague opened this issue Dec 17, 2020 · 3 comments
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request

Comments

@displague
Copy link
Member

We should be able to simplify some of the documentation now that the module is published to provide a less developer-centric installation.

If the GCP Terraform provider can be incorporated (#14), we could further simplify the installation instructions because Terraform's built in variable prompts would be run on apply and we wouldn't need the util/setup_gcp_project.sh script.

Here are some early thoughts on what simplified instructions could offer:

No need to git clone:

terraform init --from-module=equinix/anthos-on-baremetal/metal
util/setup_gcp_project.sh # We should explain where all the Google Container Registry (GCR) service account value can be found
terraform apply

To avoid entering all the variables every time you terraform apply, you can create a terraform.tfvars file, any of the input variables can be stored in this file.

When the terraform apply is done (with a green text summary), you can do things like:

KUBECONFIG=$(terraform output Kubeconfig_location) kubectl get nodes

and

ssh -i $(terraform output ssh_key_location) root@$(terraform output -json Worker_Public_IPs | jq '.[0]' ) # 0 is the first worker

A complete list of output variables is available at https://registry.terraform.io/modules/equinix/anthos-on-baremetal/metal/latest?tab=outputs.

To use this module in a larger configuration:

# example that demonstrates consuming the Kubeconfig variable 

If you plan to contribute to the project, rather than running terraform init --from-module=equinix/anthos-on-baremetal/metal, you will want to run:

git clone git@github.com:equinix/terraform-metal-anthos-on-baremetal
terraform init
@displague
Copy link
Member Author

We should also note that gcloud init should be run, if it is not already configured.

@joshpadilla
Copy link
Collaborator

joshpadilla commented Mar 9, 2021

Can someone assign this doc update to me? I may break each suggestion into a smaller issue so they are easier to track, etc. I've created a local branch for readme update.

@displague displague added documentation Improvements or additions to documentation enhancement New feature or request labels Mar 10, 2021
@displague
Copy link
Member Author

Anthos approach that should be recommended in this section, is that a user need only create the following main.tf:

module "anthos-on-baremetal" {
  source  = "equinix/anthos-on-baremetal/metal"
  version = "0.5.1"
 
  gcp_project_id = "..."
  metal_auth_token = "..."
  storage_module = "portworx"
  storage_options = {}
}

Then run:

$ gcloud init
$ gcloud auth application-default login
$ terraform init
$ terraform apply

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants