modify user guide

This commit is contained in:
Wenkai Yin 2016-03-08 11:58:48 +08:00
parent 401f5d53da
commit 8d72670213

View File

@ -2,11 +2,11 @@
##Overview
This guide takes you through the fundamentals of using Harbor. You'll learn how to use Harbor to:
* Manage your projects.
* Manage the members of a project.
* Search projects and repositories.
* Manage Harbor system if you are the system administrator.
* Pull and push images using Docker client.
* 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
@ -14,38 +14,51 @@ RBAC (Role Based Access Control) is provided in Harbor and there are four roles
* **Guest**: Guest has read-only privilege for a specified project.
* **Developer**: Developer has read and write privileges for a project.
* **ProjectAdmin**: When create 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.
* **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.
##User account operations
Username, Email, full name and password are required to sign up in Harbor. The password mast match the rule: at least 7 characters with 1 lowercase letter, 1 capital letter and 1 numeric character.
"Change Password" and "Forgot Password" are also supported. You can follow the steps to reset your password:
1. Click the link "forgot password" in the sign in page.
2. Input the Email used when you signed up and a email will be sent to it.
3. Click the link contained in the email.
4. Input your new password and click "Submit".
##Managing projects
A project in Harbor is a namespace that role based access control is applied to it and the repositories in it. Two types of projects are provided:
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 been accessed by its members.
* **Private**: A private project can only been accessed by users with proper privileges.
You can create a project after you signing in. Enable the "Public project" checkbox will make this project public.
You can create a project after you signed in. Enable the "Public project" checkbox will make this project public.
![create project](img/create_project.png)
After the project being created, you can browse the repositories, members and access logs using the tabs in the left.
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 will be listed by clicking "Logs", you can filter them by username or operations and date which are supported in "Advanced Search".
![browse project](img/project_log.png)
##Managing the members of a project
##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 the members by click the icons.
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
If you have signed in, you will get a list of projects and repositories that you have read privilege to and contain the keywords. Otherwise, only the public projects will be listed.
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)
@ -56,41 +69,41 @@ Administrator can add "SysAdmin" role to an ordinary user and delete users by cl
![browse project](img/set_admin_remove_user.png)
##Pulling and pushing images using Docker client
**NOTE: The Registry V2 is compatible only with Docker engine version 1.6.0 or higher, so the version of your Docker must meet the requirement.**
**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.
If the project that the image belongs to is private, you should sign in first:
```sh
$ docker login 10.117.169.182
```
And then you can pull the image.
You can now pull the image:
```sh
$ docker pull 10.117.169.182/library/ubuntu:14.04
```
**Note: Replace "10.117.169.182" with your Harbor IP or domain name.**
**Note: Replace "10.117.169.182" with the IP address or domain name of your Harbor node.**
###Pushing images
Before pushing images, you must create corresponding projects using Harbor web UI.
Before pushing an image, you must create a corresponding project on Harbor web UI.
Sign in first.
First, log in from Docker client:
```sh
$ docker login 10.117.169.182
```
Tag the image.
Tag the image:
```sh
$ docker tag ubuntu:14.04 10.117.169.182/demo/ubuntu:14.04
```
Push the image.
Push the image:
```sh
$ docker push 10.117.169.182/demo/ubuntu:14.04
```
**Note: Replace "10.117.169.182" with your Harbor IP or domain name.**
**Note: Replace "10.117.169.182" with the IP address or domain name of your Harbor node.**