16379: doc updates
authorPeter Amstutz <peter.amstutz@curii.com>
Tue, 28 Mar 2023 20:38:25 +0000 (16:38 -0400)
committerPeter Amstutz <peter.amstutz@curii.com>
Tue, 28 Mar 2023 20:38:25 +0000 (16:38 -0400)
Arvados-DCO-1.1-Signed-off-by: Peter Amstutz <peter.amstutz@curii.com>

doc/install/salt-multi-host.html.textile.liquid
tools/salt-install/installer.sh
tools/salt-install/local.params.example.multiple_hosts

index ae76c5b58deab73fbf30099e9958824dadcb55ef..ed6a20197d61dc4325654abfb92dc0132ead5506 100644 (file)
@@ -95,7 +95,7 @@ The Terraform state files (that keep crucial infrastructure information from the
 
 h4. Terraform code configuration
 
-Each section described above contain a @terraform.tfvars@ file with some configuration values that you should set before applying each configuration. You should set the cluster prefix and domain name in @vpc/terraform.tfvars@:
+Each section described above contain a @terraform.tfvars@ file with some configuration values that you should set before applying each configuration. You should set the cluster prefix and domain name in @terraform/vpc/terraform.tfvars@:
 
 <pre><code>region_name = "us-east-1"
 # cluster_name = "xarv1"
@@ -105,6 +105,15 @@ If you don't set the variables @vpc/terraform.tfvars@ file, you will be asked to
 
 The @data-storage/terraform.tfvars@ and @services/terraform.tfvars@ let you configure the location of your ssh public key (default @~/.ssh/id_rsa.pub@) and the instance type to use (default @m5a.large@).
 
+h4. Set credentials
+
+You will need an AWS access key and secret key to create the infrastructure.
+
+<pre><code>
+$ export AWS_ACCESS_KEY_ID="anaccesskey"
+$ export AWS_SECRET_ACCESS_KEY="asecretkey"
+</code></pre>
+
 h4. Create the infrastructure
 
 Build the infrastructure by running @./installer.sh terraform@.  The last stage will output the information needed to set up the cluster's domain and continue with the installer. for example:
@@ -253,8 +262,8 @@ This can be found wherever you choose to initialize the install files (@~/setup-
 # Set @CLUSTER@ to the 5-character cluster identifier (e.g "xarv1")
 # Set @DOMAIN@ to the base DNS domain of the environment, e.g. "example.com"
 # Set the @*_INT_IP@ variables with the internal (private) IP addresses of each host. Since services share hosts, some hosts are the same.  See "note about /etc/hosts":#etchosts
-# Edit @CLUSTER_INT_CIDR@, this should be the CIDR of the private network that Arvados is running on, e.g. the VPC.
-CIDR stands for "Classless Inter-Domain Routing" and describes which portion of the IP address that refers to the network.  For example 192.168.3.0/24 means that the first 24 bits are the network (192.168.3) and the last 8 bits are a specific host on that network.
+# Edit @CLUSTER_INT_CIDR@, this should be the CIDR of the private network that Arvados is running on, e.g. the VPC.  If you used terraform, this is emitted as @vpc_cidr@.
+_CIDR stands for "Classless Inter-Domain Routing" and describes which portion of the IP address that refers to the network.  For example 192.168.3.0/24 means that the first 24 bits are the network (192.168.3) and the last 8 bits are a specific host on that network._
 _AWS Specific: Go to the AWS console and into the VPC service, there is a column in this table view of the VPCs that gives the CIDR for the VPC (IPv4 CIDR)._
 # Set @INITIAL_USER_EMAIL@ to your email address, as you will be the first admin user of the system.
 # Set each @KEY@ / @TOKEN@ / @PASSWORD@ to a random string.  You can use @installer.sh generate-tokens@
index 000ed32929d892dd7515cd0beb70a302fcde0ba2..e5aff213ee45aa1bf43ca55f3578b75fec904c3c 100755 (executable)
@@ -202,11 +202,12 @@ case "$subcmd" in
        if [[ -n "$TERRAFORM" ]] ; then
            mkdir $SETUPDIR/terraform
            cp -r $TERRAFORM/* $SETUPDIR/terraform/
-               cp $TERRAFORM/.gitignore $SETUPDIR/terraform/
        fi
 
        cd $SETUPDIR
        echo '*.log' > .gitignore
+       echo '**/.terraform' >> .gitignore
+       echo '**/.infracost' >> .gitignore
 
        if [[ -n "$TERRAFORM" ]] ; then
                git add terraform
@@ -235,6 +236,13 @@ case "$subcmd" in
        (cd terraform/services && echo -n 'letsencrypt_iam_secret_access_key = ' && terraform output letsencrypt_iam_secret_access_key) 2>&1 | tee -a $logfile
        ;;
 
+    terraform-destroy)
+       logfile=terraform-$(date -Iseconds).log
+       (cd terraform/services && terraform destroy) 2>&1 | tee -a $logfile
+       (cd terraform/data-storage && terraform destroy) 2>&1 | tee -a $logfile
+       (cd terraform/vpc && terraform destroy) 2>&1 | tee -a $logfile
+       ;;
+
     generate-tokens)
        for i in BLOB_SIGNING_KEY MANAGEMENT_TOKEN SYSTEM_ROOT_TOKEN ANONYMOUS_USER_TOKEN WORKBENCH_SECRET_KEY DATABASE_PASSWORD; do
            echo ${i}=$(tr -dc A-Za-z0-9 </dev/urandom | head -c 32 ; echo '')
@@ -341,6 +349,7 @@ case "$subcmd" in
        echo ""
        echo "initialize        initialize the setup directory for configuration"
        echo "terraform         create cloud resources using terraform"
+       echo "terraform-destroy destroy cloud resources created by terraform"
        echo "generate-tokens   generate random values for tokens"
        echo "deploy            deploy the configuration from the setup directory"
        echo "diagnostics       check your install using diagnostics"
index 2bf009be1b3fe9b90377fb37e9656b9e9add2026..20a04872cf1546622e0457217ad0511d4a7f6265 100644 (file)
@@ -14,7 +14,7 @@ DOMAIN="domain_fixme_or_this_wont_work"
 
 # For multi-node installs, the ssh log in for each node
 # must be root or able to sudo
-DEPLOY_USER=root
+DEPLOY_USER=admin
 
 # The mapping of nodes to roles
 # installer.sh will log in to each of these nodes and then provision