# Configuring AWS IaaS routing for Kubo

This document describes how to configure native AWS load balancers for Kubo.

## Prerequisites

Before deploying and configuring Kubo, you need to carry out the following steps to
setup the Load balancers:

1. This guide expects to be run in the same bash session as the [BOSH install](../../platforms/aws/install-bosh.md).
   If, for some reason, that is not the case, please set the `kubo_env_name` variable to the name
   of the Kubo environment before running the rest of the scripts.

1. On the BOSH bastion `cd` into the guide directory

   ```bash
   cd /share/kubo-deployment/docs/user-guide/routing/aws
   ```

1. Export these values. If you haven't tweaked any settings then use these defaults:

   ```bash
   export state_dir=~/kubo-env/${kubo_env_name}
   export kubo_terraform_state=${state_dir}/terraform.tfstate
   ```

1. Export your AWS credentials so that Terraform can use them:

   ```bash
   export AWS_ACCESS_KEY_ID=<Your AWS access key ID>
   export AWS_SECRET_ACCESS_KEY=<Your AWS secret access key>
   ```

1. Initialise Terraform state

   ```bash
   terraform init
   ```
1. Create the resources

   ```bash
   terraform apply \
      -var region=${region} \
      -var vpc_id=${vpc_id} \
      -var node_security_group_id=${default_security_groups} \
      -var public_subnet_id=${public_subnet_id} \
      -var prefix=${prefix} \
      -state=${kubo_terraform_state}
   ```

1. To get the outputs for the configuration files, run the following snippet:

   ```bash
   export master_target_pool=$(terraform output -state=${kubo_terraform_state} kubo_master_target_pool) # master_target_pool
   export kubernetes_master_host=$(terraform output -state=${kubo_terraform_state} master_lb_ip_address) # kubernetes_master_host
   ```

1. Update the Kubo environment using the following snippet:

   ```bash
   . /share/kubo-deployment/docs/user-guide/platforms/aws/setup_helpers
   set_iaas_routing "${state_dir}/director.yml"
   ```

   > It is also possible to set the configuration manually by editing the <KUBO_ENV>/director.yml

# Configuring AWS IaaS routing for Kubo

**This topic has been relocated to the new Kubo documentation site.**

**See [Configuring IaaS Routing for AWS](https://docs-kubo.cfapps.io/installing/aws/routing-aws/).**

**For an overview of how to deploy Kubo on AWS, see [Preparing AWS for Kubo](https://docs-kubo.cfapps.io/installing/aws/).**

Add deprecation notice to "Configuring AWS IaaS routing for Kubo"
Add deprecation notice to "Configuring AWS IaaS routing for Kubo"