Skip to content

Commit

Permalink
Update the manual
Browse files Browse the repository at this point in the history
  • Loading branch information
e-kuznetsov committed Aug 28, 2018
1 parent c9b0ab9 commit 0ac75d5
Show file tree
Hide file tree
Showing 10 changed files with 20 additions and 43 deletions.
63 changes: 20 additions & 43 deletions Tungsten-Fabric-15-minute-deployment-with-k8s-on-AWS.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
## Introduction

This document contains instructions to deploy a Tungsten Fabric cluster that interconnects PODs orchestrated by Kubernetes. The Tungsten Fabric cluster is composed of one controller and two compute nodes that run as EC2 VMs.
This document contains instructions how to deploy a sandbox with Tungsten Fabric cluster orchestrated by Kubernetes in AWS. The Tungsten Fabric cluster is composed of deployment node, one controller and two compute nodes that run as EC2 VMs.

[ ![](images/carbide_deployment_small.png) ](images/carbide_deployment.png)

## Requirements

Before you start using this CloudFormation template, it is necessary to subscribe to the official image of CentOS 7 x86_64 HVM.
It is necessary to subscribe to the official image of CentOS 7 x86_64 HVM before you start using the sandbox.

Once you have signed into the AWS console, go to the following URL: <a href="https://aws.amazon.com/marketplace/pp/B00O7WM7QW/" target="_blank">AWS Marketplace</a>

Press "Continue to Subscribe", then "Accept Terms".

*If you are connected as an IAM user, and you can not perform a task in AWS Marketplace, check the Appendix at the end of the document.
*If you are connected as an IAM user, and you can not perform a task in AWS Marketplace, check the Appendix at the end of the document for the instructions.

## Procedure

1. Just click on this button to create the stack:
1. Just click on this button to create the sandbox (run as AWS CloudFormation stack) :

<a href="https://console.aws.amazon.com/cloudformation/home#/stacks/new?stackName=tungstenfabric-k8s&amp;templateURL=https://s3-us-west-2.amazonaws.com/tungsten-fabric-sandbox/tungsten_fabric_stack_template.yaml" target="_blank"><img alt="Launch Stack" src="https://cdn.rawgit.com/buildkite/cloudformation-launch-stack-button-svg/master/launch-stack.svg"></a>

Expand All @@ -29,65 +31,40 @@ Press "Continue to Subscribe", then "Accept Terms".
7. Reload Stacks page and wait for Stack CREATE_COMPLETE status.
8. Select the Stack (checkbox) and check "Output" tab in the bottom pane to find Sandbox UI URL.

[ ![](images/status_stack_small.png) ](images/status_stack_1400x900.png)
[ ![](images/status_stack_small.png) ](images/status_stack_full.png)

9. Go to Sandbox UI URL and wait for the deployment (site will be available 2-3 minutes after the creation of the stack).
10. After a successful deployment, the sandbox interface will provide information to connect to Contrail and Kubernetes services.
11. Use Contrail UI URLs, login and password to start.
9. Go to Sandbox UI URL and wait for the deployment (site will be available in 2-3 minutes after the creation of the stack).
10. After a successful deployment, the sandbox interface will provide information to connect to Tungsten Fabric and Kubernetes services.
11. Use Tungsten Fabric UI URLs, login and password to start.

IMPORTANT: When you've finished using the sandbox you can use the DELETE SANDBOX button to clear all of the used resources.

[ ![](images/delete_stack_small.png) ](images/delete_stack_1400x900.png)
[ ![](images/delete_stack_small.png) ](images/delete_stack_full.png)

For double safety you can check the remaining resources in the AWS Interface.
For double safety you can check the remaining resources in the AWS Interface after deleting.

## Accessing the cluster:

You can use the ssh key specified during the launch of the stack to access any VM with the "centos" username.

```
ssh centos@<ip> # <ip> can be the public IP or the private IP of the controller/compute VM, both work
ssh -i <ssh-key name> centos@<ip> # <ip> can be the public IP or the private IP of the node
sudo -s
```
**Accessing the Contrail webUI:**

```
https://<controller-public-ip>:8143 admin / contrail123
```

**Accessing the Kubernetes dashboard:**

On the controller:

```
kubectl get pods -n kube-system -o wide | grep dashboard
```

Check the IP column. It tells you the private IP address of the compute node where the dashboard POD is running. You need to find out the associated public IP address (it is left to you as an exercise). Once you know it, you can connect to the URL:

```
https://<public-ip>:8443
```

Select the token option. Where can you get the token from? There is one on the controller’s file /root/k8s_dashboard_token.txt , but it only allows to visualize. If you want read-write access do the following:

```
kubectl get secret -n contrail | grep kubemanager
kubectl describe secret <name> -n contrail | grep "token:" | awk '{print $2}'
```
The sandbox interface will provide information about how to connect to Tungsten Fabric UI and Kubernetes dashboard.

Take your time to browse the dashboard. During the next exercises, you can choose to do some tasks on the web instead of (or in addition to) the CLI.
[ ![](images/carbide_ui_small.png) ](images/carbide_ui_full.png)


## Appendix: IAM Users

If, instead of using a root account, you are signing with an IAM user, you need to grant additional privileges for the user.
You need to grant additional privileges for the user if instead of using a root account you are signing with an IAM user.

- Log on to the AWS console.
- In the AWS services search at the top left of the console, look for IAM and select it.
- On the left navigation bar, click on the user whose privileges you need to change.
- At the right bottom, click Add inline policy.
- Go to the JSON tab, and replace the content with the following policy:
- In the AWS services search at the top left of the console look for IAM and select it.
- On the left navigation bar click on the user whose privileges you need to change.
- At the right bottom click Add inline policy.
- Go to the JSON tab and replace the content with the following policy:

```
{
Expand Down
Binary file added images/carbide_deployment.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/carbide_deployment_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/carbide_ui_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/carbide_ui_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed images/delete_stack_1400x900.png
Binary file not shown.
Binary file added images/delete_stack_full.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/delete_stack_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Binary file modified images/status_stack_small.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 0ac75d5

Please sign in to comment.