Skip to content

Commit

Permalink
various improvements to setup guides
Browse files Browse the repository at this point in the history
  • Loading branch information
Nathan Pierce committed Jul 2, 2020
1 parent 1fb11a9 commit 9bc9081
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 66 deletions.
Expand Up @@ -5,62 +5,40 @@ title: "Linux & Docker"
linkTitle: "Linux & Docker"
weight: 1
description: >
Anka Build Cloud installation instructions for Linux & Docker
Setting up your Anka Build Cloud Controller & Registry on Linux & Docker
---

[//]: # (TODO: split this to files and add configuration )
## Installing

Instructions can be found under our [Getting Started with Linux & Docker guide]({{< relref "docs/Getting Started/linux.md#step-2-install-the-anka-build-cloud-controller--registry" >}})

## Controller/Registry Linux Application package
### Install
***Note*** You can run Controller/Registry docker containers on a Linux instance. We don't recommend that you run these containers on Mac hardware. If you want to run controller/registry on mac, then use the mac application package.
## Upgrading

Move the `anka-controller-registry-XXX.tar.gz` tar file to a directory where you want the containers to run.
1. `docker-compose down` your previous installation
2. Rename the previous directory: `mv ~/anka-docker-controller-registry ~/anka-docker-controller-registry-old`
3. Download and extract the latest version tar:

1. Uncompress the tar package.
2. Edit `config.yml` and enter values for the following : external_registry_address, data_mount_dir.
***Note*** default port settings - Controller on port 80 and registry on port 8089.
3. Run `./ankaCloudConfig docker fromFile`. This will update your docker-compose with configuration changes.
4. Execute `docker-compose up -d --build`
5. Execute `docker ps -a` to check if the anka controller and anka registry containers are up and running.
6. Go to controllerIP in your web browser and check to make sure that you can access the controller portal dashboard.
```bash
mkdir -p ~/anka-docker-controller-registry
cd ~/anka-docker-controller-registry
curl -L -o anka-docker-controller-registry.tar.gz https://veertu.com/downloads/ankacontroller-registry-docker-latest
tar -xzvf anka-docker-controller-registry.tar.gz
```

4. Copy the docker-compose file from the previous version's folder into the new: `cp -rfp ~/anka-docker-controller-registry-old/docker-compose.yml ~/anka-docker-controller-registry/`
5. Start the new Cloud Controller & Registry with `--build`: `cd ~/anka-docker-controller-registry && docker-compose up -d --build`

***Note*** If you want to change default port settings, don't edit `config.yml`. Edit the `advanced.yml`.
## Uninstalling

1. `advanced.yml` configuration settings to edit for custom ports - external_registry_address, listen_on, data_mount_dir.
2. Run `./ankaCloudConfig docker fromFile -i advanced.yml`
3. Execute `docker-compose up -d --build`

### Upgrade
First, Download the latest anka-controller-registry-XXX.tar.gz from [Anka Build Download page](https://veertu.com/download-anka-build/).

Then, execute the following steps.

1. Go to the controller/registry directory and execute `docker-compose stop`.

2. Backup your existing `config.yml` and `advanced.yml`.

3. Uncompress the new controller/registry tar package.

4. Replace `config.yml` and/or `advanced.yml` with your backed up copies of these files.

5. Execute `./ankaCloudConfig docker fromFile` and/or `./ankaCloudConfig docker fromFile -i advanced.yml`

6. Execute `docker-compose up -d --build`

### Uninstall
1. Go to the controller/registry directory and execute `docker-compose stop`.
1. Go to the controller/registry directory and execute `docker-compose down`.
2. Delete the controller/registry directory.



## Debugging Issues with Controller
## Debugging Issues

Anka controller is a server that usually runs as a daemon and errors are usually written to a log.
Check the output of `docker ps`. The anka controller container status should be something like this.

```
```bash
“Up for x amount of time”. For example:
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ae6b522fdec4 test220919_anka-controller "/bin/bash -c 'anka-…" 2 minutes ago Up 2 minutes 0.0.0.0:8090->80/tcp test220919_anka-controller_1
Expand All @@ -71,10 +49,11 @@ If the controller is crashing the status could be “restarting” or “failed
You can try to run `docker-compose up` without any parameters and this will output stdout for all services to the screen.

In case one of the services is crashing you could see the errors.Here is an example.
```

```bash
anka-controller_1 | E1128 15:17:16.952500 1 main.go:618] Could not build tls configuration:
anka-controller_1 | E1128 15:17:16.953204 1 main.go:619] open /whwhwhw/path: no such file or directory
test220919_anka-controller_1 exited with code 1
```
You can also take a look at the logs using `docker logs --follow $CONTAINER_NAME`.
You can also take a look at the logs using `docker logs --tail 100 -f $CONTAINER_NAME`.

Expand Up @@ -5,51 +5,52 @@ title: "Mac OS"
linkTitle: "Mac OS"
weight: 2
description: >
Anka Build Cloud installation instructions for Mac OS
Setting up your Anka Build Cloud Controller & Registry on Mac OS
---

[//]: # (TODO: split this to files and add configuration )
## Installing

Instructions can be found under our [Getting Started with Mac OS guide]({{< relref "docs/Getting Started/macos.md#step-2-install-the-anka-build-cloud-controller--registry" >}})

## Controller/Registry Mac Application package
### Install
Install the `AnkaControllerRegistry-XXX.pkg` on the mac machine on which you want to install controller and Registry.
### Expectations

#### Default settings
1. The service runs as root
2. Anka Controller listens on port 80
3. Anka Registry is listening on port 8089
4. Registry data is stored at `/Library/Application Support/Veertu/Anka/registry`

1. Anka Controller listens on port 80
2. Anka Registry is listening on port 8089
3. Registry data is stored at `/Library/Application Support/Veertu/Anka/registry`
### Start / Stop

#### Start,Stop Controller
> The registry is included in the anka-controller service. They are restarted together.
Use `sudo anka-controller` command to start/stop/check status of the controller.

```
```bash
sudo anka-controller --help
usage: /usr/local/bin/anka-controller [start|stop|restart|status|logs]
```

#### Changing location of VM storage in the Registry
### Changing location of VM storage in the Registry

1. Stop the controller service `sudo anka-controller stop`
2. Change the default settings, including the location of registry storage by editing the `/usr/local/bin/anka-controllerd`.
3. Start the controller service `sudo anka-controller start`

Go to the `localhost:port` in the browser on the mac where you installed the controller/registry package and you will see the controller dashboard.

### Uninstall

From the command line, execute the following command.
## Uninstalling

`sudo /Library/Application Support/Veertu/Anka/tools/controller/uninstall.sh`
From the command line, execute the following command:
```bash
sudo /Library/Application Support/Veertu/Anka/tools/controller/uninstall.sh
```

## Debugging Issues with Controller
## Debugging Issues

Anka controller is a server that usually runs as a daemon and errors are usually written to a log.
The easiest way to debug the controller is to run ‘/usr/local/bin/anka-controllerd’ directly. This will output the controller log to the screen and you will be able to see if there are any errors.
1. First stop the controller with `sudo anka-controller stop`.

2. Then execute `/usr/local/bin/anka-controllerd`.
1. First stop the controller with `sudo anka-controller stop`
2. Then execute `/usr/local/bin/anka-controllerd`

You can also tail the log, the default location is '/Library/Logs/Veertu/AnkaController'. Check /usr/local/bin/anka-controllerd in order to see the log dir location.
You can also tail the log, the default location is `/Library/Logs/Veertu/AnkaController`. Check `/usr/local/bin/anka-controllerd` in order to see the log dir location.
Expand Up @@ -33,6 +33,8 @@ Push registry | string | Comma separated list of Registry addresses
ETCD defrag interval| duration | Defrag ETCD (all servers) in this interval. Pass 0 to disable | 3h | `--defrag-db-interval` | defrag_db_interval | ANKA_DEFRAG_DB_INTERVAL
Instance time out| duration | The time that instances stay in 'Terminated' state | 1m | `--instance-time-out` | instance_time_out | ANKA_INSTANCE_TIME_OUT

> Event logging requires a Enterprise Plus license and will show under the Controller's Logs section after the first instance is created.
### Logging

Name | Type | Description | default value | command line | ini | env
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/Getting Started/linux.md
Expand Up @@ -37,7 +37,7 @@ For Anka CLI commands and options, see the [Command Reference]({{< relref "docs/
> You can continue on to Step 2 while you wait for this to finish.
## Step 2: Install Anka Controller & Registry
## Step 2: Install the Anka Build Cloud Controller & Registry

> Perform the following steps on the machine intended to run the Controller & Registry.
Expand Down
2 changes: 1 addition & 1 deletion content/en/docs/Getting Started/macos.md
Expand Up @@ -33,7 +33,7 @@ For Anka CLI commands and options, see the [Command Reference]({{< relref "docs/
> You can continue on to Step 2 while you wait for this to finish.
## Step 2. Install Anka Controller & Registry
## Step 2. Install the Anka Build Cloud Controller & Registry

> Perform the following steps on the machine intended to run the Controller & Registry.
Expand Down
@@ -1,5 +1,5 @@
## What we are doing in this tutorial
1. Install the Anka CLI + Create your first VM Template
2. Install Anka Controller & Registry
2. Install the Anka Build Cloud Controller & Registry
3. Link the Anka CLI Node to the Controller
4. Start a VM instance using the Controller UI
4 changes: 4 additions & 0 deletions content/en/docs/Release Notes/_index.md
Expand Up @@ -11,6 +11,10 @@ description: >
## Current Versions

### TeamCity Plugin version 1.7.1
- Bug Fix : Long-running threads were being created
- Bug Fix : UI Slowness the more Instances/Agents you created

### Anka VM GitHub Action v1.3.0-beta - June 30, 2020
- Bug Fix : removed the need to escape quotes in commands

Expand Down

0 comments on commit 9bc9081

Please sign in to comment.