From b10387c6a92552b3762f7585be2809aa3ac2ac15 Mon Sep 17 00:00:00 2001 From: Alexander Zeitler Date: Fri, 8 Apr 2016 10:06:43 +0200 Subject: [PATCH] Move Docker Machine installation guide to contrib folder. --- contrib/deploying_using_docker_machine.md | 56 +++++++++++++++++++++ docs/installation_guide.md | 59 +---------------------- 2 files changed, 57 insertions(+), 58 deletions(-) create mode 100644 contrib/deploying_using_docker_machine.md diff --git a/contrib/deploying_using_docker_machine.md b/contrib/deploying_using_docker_machine.md new file mode 100644 index 000000000..e010dbdb0 --- /dev/null +++ b/contrib/deploying_using_docker_machine.md @@ -0,0 +1,56 @@ +### Deploying Harbor using Docker Machine +Docker Machine allows you to deploy your containers to several cloud providers or on premises using a unified interface. +To deploy Harbor using Docker Machine, first create a virtual machine using Docker Machine. + +This example will use DigitalOcean, but you can use VMware vCloud Air, AWS or Azure as well. Please see the list of supported drivers in the [Docker Machine driver documentation](https://docs.docker.com/machine/drivers/). + +``` +$ docker-machine create --driver digitalocean --digitalocean-access-token harbor.mydomain.com +``` + +After the machine has been created successfully, you need to create a DNS entry at your provider for e.g. harbor.mydomain.com using the IP address for the machine we just created. +You can get this IP address using: + +``` +$ docker-machine ip harbor.mydomain.com +``` + +Make sure to change the `hostname` in `Deploy/harbor.cfg` to `harbor.mydomain.com`, configure everything else according to the [Harbor Installation Guide](../docs/insallation_guide.md) and run `prepare`. + +Now, activate the created Docker Machine instance: + +`$ eval $(docker-machine env harbor.mydomain.com)` + +From within the `Deploy` directory, next copy the contents of the `config` directory to the machine. +First, get your local path to the `Deploy` directory: + +``` +$ echo $PWD +``` + +This will give you something like this: + +``` +/home//src/harbor/Deploy +``` + +Then create this directory structure on the remote machine and copy the local files to the remote folders: + +``` +$ docker-machine ssh harbor.mydomain.com 'mkdir -p /home//src/harbor/Deploy/config +$ docker-machine scp -r ./config harbor.mydomain.com:$PWD +``` + +Next, build your Harbor images: + +``` +$ docker-compose build +``` + +And finally, spin up your Harbor containers: + +``` +$ docker-compose up -d +``` + +Now you should be able to browse `http://harbor.mydomain.com`. \ No newline at end of file diff --git a/docs/installation_guide.md b/docs/installation_guide.md index ebe953297..7c5471a4b 100644 --- a/docs/installation_guide.md +++ b/docs/installation_guide.md @@ -139,61 +139,4 @@ Removing harbor_mysql_1 ... done ### Persistent data and log files By default, the data of database and image files in the registry are persisted in the directory **/data/** of the target machine. When Harbor's containers are removed and recreated, the data remain unchanged. -Harbor leverages rsyslog to collect the logs of each container, by default the log files are stored in the directory **/var/log/harbor/** on Harbor's host. - -### Deploying Harbor using Docker Machine -Docker Machine allows you to deploy your containers to several cloud providers or on premises using a unified interface. -To deploy Harbor using Docker Machine, first create a virtual machine using Docker Machine. - -This example will use DigitalOcean, but you can use VMware vCloud Air, AWS or Azure as well. Please see the list of supported drivers in the [Docker Machine driver documentation](https://docs.docker.com/machine/drivers/). - -``` -$ docker-machine create --driver digitalocean --digitalocean-access-token harbor.mydomain.com -``` - -After the machine has been created successfully, you need to create a DNS entry at your provider for e.g. harbor.mydomain.com using the IP address for the machine we just created. -You can get this IP address using: - -``` -$ docker-machine ip harbor.mydomain.com -``` - -Make sure to change the `hostname` in `Deploy/harbor.cfg` to `harbor.mydomain.com` and run `prepare`. - -Now, activate the created Docker Machine instance: - -`$ eval $(docker-machine env harbor.mydomain.com)` - -From within the `Deploy` directory, next copy the contents of the `config` directory to the machine. -First, get your local path to the `Deploy` directory: - -``` -$ echo $PWD -``` - -This will give you something like this: - -``` -/home//src/harbor/Deploy -``` - -Then create this directory structure on the remote machine and copy the local files to the remote folders: - -``` -$ docker-machine ssh harbor.mydomain.com 'mkdir -p /home//src/harbor/Deploy/config -$ docker-machine scp -r ./config harbor.mydomain.com:$PWD -``` - -Next, build your Harbor images: - -``` -$ docker-compose build -``` - -And finally, spin up your Harbor containers: - -``` -$ docker-compose up -d -``` - -Now you should be able to browse `http://harbor.mydomain.com`. \ No newline at end of file +Harbor leverages rsyslog to collect the logs of each container, by default the log files are stored in the directory **/var/log/harbor/** on Harbor's host. \ No newline at end of file