<commit_before># Installing a single host deployment

## Purpose of the document

This document is intended to give you a step by step guide to quick setup a single host with all infrastructures for quick glimpse. However, some advanced features are restricted with this deployment.

If you would like a detailed walkthrough with instructions for installing clusters, deploying on public cloud, or using hybrid cloud. Please contact us: <EMAIL>

## Prerequirements

1. Oracle virtual Box (Linux/Windows/Mac)
2. Spared 4 CPU core and 8 GB memory

## Install the pre-built VirtualBox Template

### Step 1 Download

1. Download the vitrual box template from [Link](https://mega.nz/#!DdNDBIxJ!VVq6ThGpKMwi4_ZnQlNL1HfwNfDJUfflGpDupSrXcoA)

### Step 2 Import

Import the template into the Virtual Box. 

1. From VirtualBox menu select File ­-> Import Appliance.
2. Select the ova image that you downloaded.
3. Click Next button and then Import.

### Step 3 Configure ip

You could use either dhcp or static ip for this instance.

1. Start the VirtualBox instance K8MasterAndNodeDynamicIP.
2. Use cloudawan/cloudawan as username/password to login Linux terminal.
3. Find the ip of the network interface eth0 by the command "ifconfig"
4. Replacing the ip 192.168.0.59 (k8node private-registry) in /etc/hosts with the eth0 ip
5. Reboot the machine with "sudo reboot"

### Step 4 Check for the CloudAwan to come up

1. After reboot, login Linux terminal and use command "kubectl get pod" to check whether the status colume of the pod having the prefix cloudone-all is "Running".
2. Enter url ​https://{eth0 ip}:30003 on the browser with admin/password as <PASSWORD>
3. Go to Dashboard -> HealthCheck to see wether all components are running. Each component is independent and has different time cost to initialize.

### Step 5 Configure host credentials

Host credentials are required to access the host to issue commands, such as accessing the container shell on GUI, deleting the unused Docker images on host, and ...etc. Due to Docker command requirements, this user used in the credentials needs to have the root privilege or the equivalent privilege group.

1. Go to System -> Host Credential
2. Press "Create" button
3. The field IP is the ip of this host (the one configured in /etc/hosts). The field user is the Linux user with root privilege, that is cloudawan in the case. The field password is the password for the Linux user, that is <PASSWORD>awan in the case.

### Step 6 (Optional) Configure the GlusterFS server

Configure the Glusterfs server to manage volumes on GUI. Due to Glusterfs command requirements, the user used in the configuration needs to have the root privilege or the equivalent privilege group.

1. Go to FileSystem -> GlusterFS
2. Press "Create" button
3. The file name is a label for user to recognize. Host list is the ip list of GlusterFS servers, that is the ip of this host (the one configured in /etc/hosts) in the case. The field path is the root directory to place the data, that is /data/glusterfs in the case. The field user is the Linux user with root privilege, that is cloudawan in the case. The field password is the password for the Linux user, that is <PASSWORD> in the case.

# Deploying the whole clusters

## Purpose of the document

This document is intended to give you a step by step guide to deploy one cluster with all infrastructures within the single data center.

## Prerequirements

1. 3 Ubuntu 14.04 instances with at least 2 CPU and 8 GB memory for Kubernetes Master/Node hosts
2. 2 Ubuntu 14.04 instances with at least 1 CPU and 2 GB memory for Glusterfs servers
3. The Ubuntu instances could be on AWS, GCE, Virtual Machine environment, bare metal environment and ...etc.

## Install with the ansible

### Step 1 Download

1. Login one of the Ubuntu 14.04 instance
2. Install git with "sudo apt-get install git"
3. Clone from github with "git clone https://github.com/cloudawan/cloudawan_install.git"
4. Move to the directory ./cloudawan_install/kubernetes1.2/

### Step 2 Configuration

1. Open the file **hosts** to modify.
2. Configure the ip for 3 Kubernetes Master/Node hosts in the section [master_node_host]. Change the ip to the physical ip of the Ubuntu 14.04 instance with at least 2 CPU and 8 GB memory and username(ansible_user) and password(both ansible_ssh_pass and ansible_become_pass) to the root user and root password.
3. Configure the host used to configure cluster level install in the section [master_node_host]. Pick up one of the 3 hosts in the section [master_node_host] and put here.<commit_msg>Add document<commit_after># Installing a single host deployment

This document is intended to give you a step by step guide to quick setup a single host with all infrastructures for quick glimpse. However, some advanced features are restricted with this deployment.

If you would like a detailed walkthrough with instructions for installing clusters, deploying on public cloud, or using hybrid cloud. Please contact us: <EMAIL>

## Prerequirements(Single Host)

1. Oracle virtual Box (Linux/Windows/Mac)
2. Spared 4 CPU core and 8 GB memory

## Install the pre-built VirtualBox Template

### Step 1 Download

1. Download the vitrual box template from [Link](https://mega.nz/#!DdNDBIxJ!VVq6ThGpKMwi4_ZnQlNL1HfwNfDJUfflGpDupSrXcoA)

### Step 2 Import

Import the template into the Virtual Box. 

1. From VirtualBox menu select File ­-> Import Appliance.
2. Select the ova image that you downloaded.
3. Click Next button and then Import.

### Step 3 Configure ip

You could use either dhcp or static ip for this instance.

1. Start the VirtualBox instance K8MasterAndNodeDynamicIP.
2. Use cloudawan/cloudawan as username/password to login Linux terminal.
3. Find the ip of the network interface eth0 by the command "ifconfig"
4. Replacing the ip 192.168.0.59 (k8node private-registry) in /etc/hosts with the eth0 ip
5. Reboot the machine with "sudo reboot"

### Step 4 Check for the CloudAwan to come up

1. After reboot, login Linux terminal and use command "kubectl get pod" to check whether the status colume of the pod having the prefix cloudone-all is "Running".
2. Enter url ​https://{eth0 ip}:30003 on the browser with admin/password as <PASSWORD>/password
3. Go to Dashboard -> HealthCheck to see wether all components are running. Each component is independent and has different time cost to initialize.

### Step 5 Configure host credentials

Host credentials are required to access the host to issue commands, such as accessing the container shell on GUI, deleting the unused Docker images on host, and ...etc. Due to Docker command requirements, this user used in the credentials needs to have the root privilege or the equivalent privilege group.

1. Go to System -> Host Credential
2. Press "Create" button
3. The field IP is the ip of this host (the one configured in /etc/hosts). The field user is the Linux user with root privilege, that is cloudawan in the case. The field password is the password for the Linux user, that is <PASSWORD> in the case.

### Step 6 (Optional) Configure the GlusterFS server

Configure the Glusterfs server to manage volumes on GUI. Due to Glusterfs command requirements, the user used in the configuration needs to have the root privilege or the equivalent privilege group.

1. Go to FileSystem -> GlusterFS
2. Press "Create" button
3. The file name is a label for user to recognize. Host list is the ip list of GlusterFS servers, that is the ip of this host (the one configured in /etc/hosts) in the case. The field path is the root directory to place the data, that is /data/glusterfs in the case. The field user is the Linux user with root privilege, that is cloudawan in the case. The field password is the password for the Linux user, that is <PASSWORD> in the case.

# Deploying the whole clusters

This document is intended to give you a step by step guide to deploy one cluster with all infrastructures within the single data center.

## Prerequirements(Cluster)

1. 3 Ubuntu 14.04 instances with at least 2 CPU and 8 GB memory for Kubernetes Master/Node hosts
2. 2 Ubuntu 14.04 instances with at least 1 CPU and 2 GB memory for Glusterfs servers
3. The Ubuntu instances could be on AWS, GCE, Virtual Machine environment, bare metal environment and ...etc.

## Install with the ansible

### Step 1 Download

1. Login one of the Ubuntu 14.04 instance
2. Install git with "sudo apt-get install git"
3. Clone from github with "git clone https://github.com/cloudawan/cloudawan_install.git"
4. Move to the directory ./cloudawan_install/kubernetes1.2/

### Step 2 Configuration

1. Open the file **hosts** to modify.
2. Configure the ip for 3 Kubernetes Master/Node hosts in the section [master_node_host]. Change the ip to the physical ip of the Ubuntu 14.04 instance with at least 2 CPU and 8 GB memory and username(ansible_user) and password(both <PASSWORD>_ssh_pass and <PASSWORD>) to the root user and root password.
3. Configure the host used to configure cluster level install in the section [master_node_host]. Pick up one of the 3 hosts in the section [master_node_host] and put here.
{'fraction_non_alphanumeric': 0.05364194822290478, 'fraction_numerical': 0.019745502413339184, 'mean_word_length': 4.1919134396355355, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 21, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6960963', 'n_tokens_mistral': 2577, 'n_tokens_neox': 2380, 'n_words': 1427}