Merge pull request #12 from ywk253100/master

User Guide
This commit is contained in:
reasonerjt 2016-03-09 09:57:13 +08:00
commit 6c3c71bf83
9 changed files with 115 additions and 1 deletions

View File

@ -29,7 +29,9 @@ Generated configuration file: ./config/registry/config.yml
Generated configuration file: ./config/db/env
$ docker-compose up
```
*An installation package is provided, such that you don't need to clone the whole repo. For details on how to use the installation package and parameters in harbor.cfg, please refer to:* [Installation Guide](docs/installation_guide.md)
*An installation package is provided, such that you don't need to clone the whole repo. For details on how to use the installation package and parameters in harbor.cfg, please refer to:* [Installation Guide](docs/installation_guide.md)
*For information on how to use Harbor, please see* [User Guide](docs/user_guide.md)
### Contribution
We welcome contributions from the community. If you wish to contribute code, we require that you first sign our [Contributor License Agreement](https://vmware.github.io/photon/assets/files/vmware_cla.pdf) and return a copy to osscontributions@vmware.com before we can merge your contribution.

BIN
docs/img/add_member.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

BIN
docs/img/browse_project.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
docs/img/create_project.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

BIN
docs/img/project_log.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

BIN
docs/img/remove_update_member.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

BIN
docs/img/search.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

112
docs/user_guide.md Executable file
View File

@ -0,0 +1,112 @@
#User Guide
##Overview
This guide takes you through the fundamentals of using Harbor. You'll learn how to use Harbor to:
* Manage your projects.
* Manage members of a project.
* Search projects and repositories.
* Manage Harbor system if you are the system administrator.
* Pull and push images using Docker client.
##Role Based Access Control
RBAC (Role Based Access Control) is provided in Harbor and there are four roles with different privileges:
* **Guest**: Guest has read-only privilege for a specified project.
* **Developer**: Developer has read and write privileges for a project.
* **ProjectAdmin**: When creating a new project, you will be assigned the "ProjectAdmin" role to the project. Besides read-write privileges, the "ProjectAdmin" also has some management privileges, such as adding and removing members.
* **SysAdmin**: "SysAdmin" has the most privileges. In addition to the privileges mentioned above, "SysAdmin" can also list all projects, set an ordinary user as administrator and delete users. The public project "library" is also owned by the administrator.
* **Anonymous**: When a user is not logged in, the user is considered as an "anonymous" user. An anonymous user has no access to private projects and has read-only access to public projects.
##User account
As a new user, you can sign up an account by going through the self-registration process. The username and email must be unique in the Harbor system. The password must contain at least 7 characters with 1 lowercase letter, 1 uppercase letter and 1 numeric character.
If the administrator has configured LDAP/AD as authentication source, no sign-up is required. The LDAP/AD user id can be used directly to log in to Harbor.
When you forgot your password, you can follow the below steps to reset the password:
1. Click the link "forgot password" in the sign in page.
2. Input the email used when you signed up, an email will be sent out to you.
3. After receiving the email, click on the link in the email which directs you to a password reset web page.
4. Input your new password and click "Submit".
##Managing projects
A project in Harbor contains all repositories of an application. RBAC is applied to a project. There are two types of projects in Harbor:
* **Public**: All users have the read privilege to a public project, it's convenient for you to share some repositories with others in this way.
* **Private**: A private project can only be accessed by users with proper privileges.
You can create a project after you signed in. Enabling the "Public project" checkbox will make this project public.
![create project](img/create_project.png)
After the project is created, you can browse repositories, users and access logs using the navigation column on the left.
![browse project](img/browse_project.png)
All access logs can be listed by clicking "Logs". You can apply a filter by username, or operations and dates under "Advanced Search".
![browse project](img/project_log.png)
##Managing members of a project
###Adding members
You can add members with different roles to an existing project.
![browse project](img/add_member.png)
###Updating and removing members
You can update or remove a member by clicking the icon on the right.
![browse project](img/remove_update_member.png)
##Searching projects and repositories
Entering a keyword in the search field at the top lists all matching projects and repos. The search result includes public repos and private repos you have access privilege to.
![browse project](img/search.png)
##Administrator options
###Setting administrator and deleting user
Administrator can add "SysAdmin" role to an ordinary user by toggling the switch under "System Admin". To delete a user, click on the recycle bin icon.
![browse project](img/set_admin_remove_user.png)
##Pulling and pushing images using Docker client
**NOTE: Harbor only supports Registry V2 API. You need to use Docker client 1.6.0 or higher.**
###Pulling images
If the project that the image belongs to is private, you should sign in first:
```sh
$ docker login 10.117.169.182
```
You can now pull the image:
```sh
$ docker pull 10.117.169.182/library/ubuntu:14.04
```
**Note: Replace "10.117.169.182" with the IP address or domain name of your Harbor node.**
###Pushing images
Before pushing an image, you must create a corresponding project on Harbor web UI.
First, log in from Docker client:
```sh
$ docker login 10.117.169.182
```
Tag the image:
```sh
$ docker tag ubuntu:14.04 10.117.169.182/demo/ubuntu:14.04
```
Push the image:
```sh
$ docker push 10.117.169.182/demo/ubuntu:14.04
```
**Note: Replace "10.117.169.182" with the IP address or domain name of your Harbor node.**