diff --git a/AUTHORS b/AUTHORS index f6e2e7e0e..8e9802ff4 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,5 +1,6 @@ # This file lists all individuals having contributed content to the repository. +Alexander Zeitler Amanda Zhang Benniu Ji Bobby Zhang @@ -9,8 +10,8 @@ Haining Henry Zhang Hao Xia Jack Liu Kun Wang +Peng Zhao Shan Zhu Victoria Zheng Wenkai Yin Yan Wang - diff --git a/README.md b/README.md index 88b93ad34..64df2368e 100644 --- a/README.md +++ b/README.md @@ -46,7 +46,7 @@ The host must be connected to the Internet. If everything works fine, you can open a browser to visit the admin portal at http://reg.yourdomain.com . The default administrator username and password are admin/Harbor12345 . -Create a new project, e.g. myproject, in the admin portal. You can then use docker commands to login and push images. The default port of Harbor registry server is 80: +Log in to the admin portal and create a new project, e.g. myproject. You can then use docker commands to login and push images. The default port of Harbor registry server is 80: ```sh $ docker login reg.yourdomain.com $ docker push reg.yourdomain.com/myproject/myrepo @@ -68,3 +68,6 @@ Harbor is available under the [Apache 2 license](LICENSE). ### Users MaDaiLiCai + +### Supporting Technologies +beego Harbor is powered by Beego, an open source framework to build and develop applications in the Go way. diff --git a/docs/configure_https.md b/docs/configure_https.md index e366cb5d7..003fcfd6a 100644 --- a/docs/configure_https.md +++ b/docs/configure_https.md @@ -1,8 +1,8 @@ -#Configure Harbor with HTTPS Access +#Configuring Harbor with HTTPS Access Because Harbor does not ship with any certificates, it uses HTTP by default to serve registry requests. This makes it relatively simple to configure. However, it is highly recommended that security be enabled for any production environment. Harbor has an Nginx instance as a reverse proxy for all services, you can configure Nginx to enable https. -##Get a certificate +##Getting a certificate Assuming that your registry's **hostname** is **reg.yourdomain.com**, and that its DNS record points to the host where you are running Harbor. You first should get a certificate from a CA. The certificate usually contains a .crt file and a .key file, for example, **yourdomain.com.crt** and **yourdomain.com.key**. @@ -22,7 +22,7 @@ In a test or development environment, you may choose to use a self-signed certif ``` 3) Generate the certificate of your registry host: -You need to configure openssl first. On Ubuntu, the config file locates at /etc/ssl/openssl.cnf. Refer to openssl document for more information. The default CA directory of openssl is called demoCA. Let's create necessary directories and files: +You need to configure openssl first. On Ubuntu, the config file locates at **/etc/ssl/openssl.cnf**. Refer to openssl document for more information. The default CA directory of openssl is called demoCA. Let's create necessary directories and files: ``` mkdir demoCA cd demoCA @@ -40,7 +40,11 @@ After obtaining the **yourdomain.com.crt** and **yourdomain.com.key** files, cha ``` cd Deploy/config/nginx ``` -Create a new directory cert/, if it does not exist. Then copy **yourdomain.com.crt** and **yourdomain.com.key** to cert/. +Create a new directory cert/, if it does not exist. Then copy **yourdomain.com.crt** and **yourdomain.com.key** to cert/, e.g. : +``` + cp yourdomain.com.crt cert/ + cp yourdomain.com.key cert/ +``` Rename the existing configuration file of Nginx: ``` diff --git a/docs/img/beegoLogo.png b/docs/img/beegoLogo.png new file mode 100644 index 000000000..ada97519d Binary files /dev/null and b/docs/img/beegoLogo.png differ diff --git a/docs/installation_guide.md b/docs/installation_guide.md index 1c4aa4bd4..56d0c5152 100644 --- a/docs/installation_guide.md +++ b/docs/installation_guide.md @@ -28,7 +28,7 @@ Before installing Harbor, you should configure the parameters in the file **harb At minimum, you need to change the **hostname** attribute in **harbor.cfg**. The description of each attribute is as follows: **hostname**: The hostname for a user to access the user interface and the registry service. It should be the IP address or the fully qualified domain name (FQDN) of your target machine, for example 192.168.1.10 or reg.yourdomain.com . Do NOT use localhost or 127.0.0.1 for the hostname because the registry service needs to be accessed by external clients. -**ui_url_protocol**: The protocol for accessing the user interface and the token/notification service, by default it is http. +**ui_url_protocol**: The protocol for accessing the user interface and the token/notification service, by default it is http. To set up the https protocol, refer to [Configuring Harbor with HTTPS Access](configure_https.md). **Email settings**: the following 5 attributes are used to send an email to reset a user's password, they are not mandatory unless the password reset function is needed in Harbor. * email_server = smtp.mydomain.com * email_server_port = 25 @@ -40,8 +40,9 @@ At minimum, you need to change the **hostname** attribute in **harbor.cfg**. The **auth_mode**: The authentication mode of Harbor. By default it is *db_auth*, i.e. the credentials are stored in a database. Please set it to *ldap_auth* if you want to verify user's credentials against an LDAP server. **ldap_url**: The URL for LDAP endpoint, for example ldaps://ldap.mydomain.com. It is only used when **auth_mode** is set to *ldap_auth*. **ldap_basedn**: The basedn template for verifying the user's credentials against LDAP, for example uid=%s,ou=people,dc=mydomain,dc=com. It is only used when **auth_mode** is set to *ldap_auth*. -**db_password**: The password of root user of mySQL database. +**db_password**: The password of root user of mySQL database. Change this password for any production use. **self_registration**: The flag to turn on or off the user self-registration function. If this flag is turned off, only an admin user can create new users in Harbor. The default value is on. +NOTE: When **auth_mode** is *ldap_auth*, the self-registration feature is always disabled, therefore, this flag is ignored. #### Building and starting Harbor After configuring harbor.cfg, build and start Harbor by the following commands. Because it requires downloading necessary files from the Internet, it may take a while for the docker-compose process to finish. @@ -61,7 +62,7 @@ After configuring harbor.cfg, build and start Harbor by the following commands. If everything works fine, you can open a browser to visit the admin portal at http://reg.yourdomain.com . The default administrator username and password are admin/Harbor12345 . -Create a new project, e.g. myproject, in the admin portal. You can then use docker commands to login and push images. The default port of Harbor registry server is 80: +Log in to the admin portal and create a new project, e.g. myproject. You can then use docker commands to login and push images. The default port of Harbor registry server is 80: ```sh $ docker login reg.yourdomain.com $ docker push reg.yourdomain.com/myproject/myrepo @@ -96,7 +97,7 @@ $ sudo docker-compose up -d ...... ``` -### Deploying Harbor to a target machine that does not have Internet access +### Deploying Harbor to a host which does not have Internet access When you run *docker-compose up* to start Harbor, it will pull base images from Docker Hub and build new images for the containers. This process requires accessing the Internet. If you want to deploy Harbor to a host that is not connected to the Internet, you need to prepare Harbor on a machine that has access to the Internet. After that, you export the images as tgz files and transfer them to the target machine. Then load the tgz file into Docker's local image repo. #### Building and saving images for offline installation @@ -121,8 +122,10 @@ $ cd ../ $ tar -cvzf harbor_offline-0.1.1.tgz harbor ``` -The file **harbor_offline-0.1.1.tgz** contains the images saved by previously steps and the files required to start Harbor. -You can use tools such as scp to transfer the file **harbor_offline-0.1.1.tgz** to the target machine that does not have Internet connection. On the target machine, you can execute the following commands to start Harbor. Again, before running the **prepare** script, be sure to update **harbor.cfg** to reflect the right configuration of the target machine. (Refer to Section [Configure Harbor](#configuring-harbor) .) +The file **harbor_offline-0.1.1.tgz** contains the images saved by previous steps and the other files required to start Harbor. +You can use tools such as scp to transfer the file **harbor_offline-0.1.1.tgz** to the target machine that does not have Internet connection. +On the target machine, you can execute the following commands to start Harbor. Again, before running the **prepare** script, +be sure to update **harbor.cfg** to reflect the right configuration of the target machine. (Refer to Section [Configuring Harbor](#configuring-harbor) .) ``` $ tar -xzvf harbor_offline-0.1.1.tgz $ cd harbor