mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-22 18:25:56 +01:00
Merge pull request #8593 from ninjadq/fix_wording_in_doc
Update config file names
This commit is contained in:
commit
97c40df40f
7
.github/ISSUE_TEMPLATE/bug_report.md
vendored
7
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,7 +1,6 @@
|
||||
---
|
||||
name: Bug report
|
||||
about: Create a report to help us improve
|
||||
|
||||
---
|
||||
|
||||
If you are reporting a problem, please make sure the following information are provided:
|
||||
@ -14,10 +13,12 @@ Please provide the steps to reproduce this problem.
|
||||
|
||||
**Versions:**
|
||||
Please specify the versions of following systems.
|
||||
|
||||
- harbor version: [x.x.x]
|
||||
- docker engine version: [y.y.y]
|
||||
- docker-compose version: [z.z.z]
|
||||
|
||||
**Additional context:**
|
||||
* **Harbor config files:** You can get them by packaging `harbor.cfg` and files in the same directory, including subdirectory.
|
||||
* **Log files:** You can get them by package the `/var/log/harbor/` .
|
||||
|
||||
- **Harbor config files:** You can get them by packaging `harbor.yml` and files in the same directory, including subdirectory.
|
||||
- **Log files:** You can get them by package the `/var/log/harbor/` .
|
||||
|
@ -49,7 +49,7 @@ Harbor is hosted by the [Cloud Native Computing Foundation](https://cncf.io) (CN
|
||||
|
||||
**System requirements:**
|
||||
|
||||
**On a Linux host:** docker 17.06.0-ce+ and docker-compose 1.23.0+ .
|
||||
**On a Linux host:** docker 17.06.0-ce+ and docker-compose 1.18.0+ .
|
||||
|
||||
Download binaries of **[Harbor release ](https://github.com/vmware/harbor/releases)** and follow **[Installation & Configuration Guide](docs/installation_guide.md)** to install Harbor.
|
||||
|
||||
|
@ -1,4 +1,5 @@
|
||||
### 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.
|
||||
|
||||
@ -15,7 +16,7 @@ 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/installation_guide.md) and run `prepare`.
|
||||
Make sure to change the `hostname` in `Deploy/harbor.yml` to `harbor.mydomain.com`, configure everything else according to the [Harbor Installation Guide](../docs/installation_guide.md) and run `prepare`.
|
||||
|
||||
Now, activate the created Docker Machine instance:
|
||||
|
||||
|
@ -6,16 +6,16 @@ This guide provides instructions for developers to build and run Harbor from sou
|
||||
|
||||
Harbor is deployed as several Docker containers and most of the code is written in Go language. The build environment requires Docker, Docker Compose and golang development environment. Please install the below prerequisites:
|
||||
|
||||
| Software | Required Version |
|
||||
| -------------- | ---------------- |
|
||||
| docker | 17.05 + |
|
||||
| docker-compose | 1.18.0 + |
|
||||
| python | 2.7 + |
|
||||
| git | 1.9.1 + |
|
||||
| make | 3.81 + |
|
||||
| golang\* | 1.7.3 + |
|
||||
|
||||
Software | Required Version
|
||||
----------------------|--------------------------
|
||||
docker | 17.05 +
|
||||
docker-compose | 1.23.0 +
|
||||
git | 1.9.1 +
|
||||
make | 3.81 +
|
||||
golang* | 1.7.3 +
|
||||
*optional, required only if you use your own Golang environment.
|
||||
|
||||
\*optional, required only if you use your own Golang environment.
|
||||
|
||||
## Step 2: Getting the source code
|
||||
|
||||
@ -40,25 +40,25 @@ You can compile the code by one of the three approaches:
|
||||
|
||||
#### I. Build with official Golang image
|
||||
|
||||
* Get official Golang image from docker hub:
|
||||
- Get official Golang image from docker hub:
|
||||
|
||||
```sh
|
||||
$ docker pull golang:1.12.5
|
||||
```
|
||||
|
||||
* Build, install and bring up Harbor without Notary:
|
||||
- Build, install and bring up Harbor without Notary:
|
||||
|
||||
```sh
|
||||
$ make install GOBUILDIMAGE=golang:1.12.5 COMPILETAG=compile_golangimage
|
||||
```
|
||||
|
||||
* Build, install and bring up Harbor with Notary:
|
||||
- Build, install and bring up Harbor with Notary:
|
||||
|
||||
```sh
|
||||
$ make install GOBUILDIMAGE=golang:1.12.5 COMPILETAG=compile_golangimage NOTARYFLAG=true
|
||||
```
|
||||
|
||||
* Build, install and bring up Harbor with Clair:
|
||||
- Build, install and bring up Harbor with Clair:
|
||||
|
||||
```sh
|
||||
$ make install GOBUILDIMAGE=golang:1.12.5 COMPILETAG=compile_golangimage CLAIRFLAG=true
|
||||
@ -66,7 +66,7 @@ You can compile the code by one of the three approaches:
|
||||
|
||||
#### II. Compile code with your own Golang environment, then build Harbor
|
||||
|
||||
* Move source code to $GOPATH
|
||||
- Move source code to \$GOPATH
|
||||
|
||||
```sh
|
||||
$ mkdir $GOPATH/src/github.com/goharbor/
|
||||
@ -74,14 +74,14 @@ You can compile the code by one of the three approaches:
|
||||
$ mv harbor $GOPATH/src/github.com/goharbor/.
|
||||
```
|
||||
|
||||
* Build, install and run Harbor without Notary and Clair:
|
||||
- Build, install and run Harbor without Notary and Clair:
|
||||
|
||||
```sh
|
||||
$ cd $GOPATH/src/github.com/goharbor/harbor
|
||||
$ make install
|
||||
```
|
||||
|
||||
* Build, install and run Harbor with Notary and Clair:
|
||||
- Build, install and run Harbor with Notary and Clair:
|
||||
|
||||
```sh
|
||||
$ cd $GOPATH/src/github.com/goharbor/harbor
|
||||
@ -100,49 +100,50 @@ If everything worked properly, you can get the below message:
|
||||
Refer to [Installation and Configuration Guide](installation_guide.md#managing-harbors-lifecycle) for more information about managing your Harbor instance.
|
||||
|
||||
## Appendix
|
||||
* Using the Makefile
|
||||
|
||||
- Using the Makefile
|
||||
|
||||
The `Makefile` contains these configurable parameters:
|
||||
|
||||
Variable | Description
|
||||
-------------------|-------------
|
||||
BASEIMAGE | Container base image, default: photon
|
||||
DEVFLAG | Build model flag, default: dev
|
||||
COMPILETAG | Compile model flag, default: compile_normal (local golang build)
|
||||
NOTARYFLAG | Notary mode flag, default: false
|
||||
CLAIRFLAG | Clair mode flag, default: false
|
||||
HTTPPROXY | NPM http proxy for Clarity UI builder
|
||||
REGISTRYSERVER | Remote registry server IP address
|
||||
REGISTRYUSER | Remote registry server user name
|
||||
REGISTRYPASSWORD | Remote registry server user password
|
||||
REGISTRYPROJECTNAME| Project name on remote registry server
|
||||
VERSIONTAG | Harbor images tag, default: dev
|
||||
PKGVERSIONTAG | Harbor online and offline version tag, default:dev
|
||||
| Variable | Description |
|
||||
| ------------------- | ---------------------------------------------------------------- |
|
||||
| BASEIMAGE | Container base image, default: photon |
|
||||
| DEVFLAG | Build model flag, default: dev |
|
||||
| COMPILETAG | Compile model flag, default: compile_normal (local golang build) |
|
||||
| NOTARYFLAG | Notary mode flag, default: false |
|
||||
| CLAIRFLAG | Clair mode flag, default: false |
|
||||
| HTTPPROXY | NPM http proxy for Clarity UI builder |
|
||||
| REGISTRYSERVER | Remote registry server IP address |
|
||||
| REGISTRYUSER | Remote registry server user name |
|
||||
| REGISTRYPASSWORD | Remote registry server user password |
|
||||
| REGISTRYPROJECTNAME | Project name on remote registry server |
|
||||
| VERSIONTAG | Harbor images tag, default: dev |
|
||||
| PKGVERSIONTAG | Harbor online and offline version tag, default:dev |
|
||||
|
||||
* Predefined targets:
|
||||
- Predefined targets:
|
||||
|
||||
Target | Description
|
||||
--------------------|-------------
|
||||
all | prepare env, compile binaries, build images and install images
|
||||
prepare | prepare env
|
||||
compile | compile ui and jobservice code
|
||||
compile_portal | compile portal code
|
||||
compile_ui | compile ui binary
|
||||
compile_jobservice | compile jobservice binary
|
||||
build | build Harbor docker images (default: using build_photon)
|
||||
build_photon | build Harbor docker images from Photon OS base image
|
||||
install | compile binaries, build images, prepare specific version of compose file and startup Harbor instance
|
||||
start | startup Harbor instance (set NOTARYFLAG=true when with Notary)
|
||||
down | shutdown Harbor instance (set NOTARYFLAG=true when with Notary)
|
||||
package_online | prepare online install package
|
||||
package_offline | prepare offline install package
|
||||
pushimage | push Harbor images to specific registry server
|
||||
clean all | remove binary, Harbor images, specific version docker-compose file, specific version tag and online/offline install package
|
||||
cleanbinary | remove ui and jobservice binary
|
||||
cleanimage | remove Harbor images
|
||||
cleandockercomposefile | remove specific version docker-compose
|
||||
cleanversiontag | remove specific version tag
|
||||
cleanpackage | remove online/offline install package
|
||||
| Target | Description |
|
||||
| ---------------------- | --------------------------------------------------------------------------------------------------------------------------- |
|
||||
| all | prepare env, compile binaries, build images and install images |
|
||||
| prepare | prepare env |
|
||||
| compile | compile ui and jobservice code |
|
||||
| compile_portal | compile portal code |
|
||||
| compile_ui | compile ui binary |
|
||||
| compile_jobservice | compile jobservice binary |
|
||||
| build | build Harbor docker images (default: using build_photon) |
|
||||
| build_photon | build Harbor docker images from Photon OS base image |
|
||||
| install | compile binaries, build images, prepare specific version of compose file and startup Harbor instance |
|
||||
| start | startup Harbor instance (set NOTARYFLAG=true when with Notary) |
|
||||
| down | shutdown Harbor instance (set NOTARYFLAG=true when with Notary) |
|
||||
| package_online | prepare online install package |
|
||||
| package_offline | prepare offline install package |
|
||||
| pushimage | push Harbor images to specific registry server |
|
||||
| clean all | remove binary, Harbor images, specific version docker-compose file, specific version tag and online/offline install package |
|
||||
| cleanbinary | remove ui and jobservice binary |
|
||||
| cleanimage | remove Harbor images |
|
||||
| cleandockercomposefile | remove specific version docker-compose |
|
||||
| cleanversiontag | remove specific version tag |
|
||||
| cleanpackage | remove online/offline install package |
|
||||
|
||||
#### EXAMPLE:
|
||||
|
||||
@ -155,7 +156,6 @@ cleanpackage | remove online/offline install package
|
||||
|
||||
**Note**: need add "/" on end of REGISTRYSERVER. If REGISTRYSERVER is not set, images will be pushed directly to Docker Hub.
|
||||
|
||||
|
||||
```sh
|
||||
$ make pushimage -e DEVFLAG=false REGISTRYUSER=[$USERNAME] REGISTRYPASSWORD=[$PASSWORD] REGISTRYPROJECTNAME=[$PROJECTNAME]
|
||||
|
||||
@ -167,6 +167,7 @@ cleanpackage | remove online/offline install package
|
||||
$ make clean -e VERSIONTAG=[TAG]
|
||||
|
||||
```
|
||||
|
||||
**Note**: If new code had been added to Github, the git commit TAG will change. Better use this command to clean up images and files of previous TAG.
|
||||
|
||||
#### By default, the make process create a development build. To create a release build of Harbor, set the below flag to false.
|
||||
|
@ -31,7 +31,7 @@ Harbor is deployed as several Docker containers, and, therefore, can be deployed
|
||||
|Software|Version|Description|
|
||||
|---|---|---|
|
||||
|Docker engine|version 17.06.0-ce+ or higher|For installation instructions, please refer to: [docker engine doc](https://docs.docker.com/engine/installation/)|
|
||||
|Docker Compose|version 1.23.0 or higher|For installation instructions, please refer to: [docker compose doc](https://docs.docker.com/compose/install/)|
|
||||
|Docker Compose|version 1.18.0 or higher|For installation instructions, please refer to: [docker compose doc](https://docs.docker.com/compose/install/)|
|
||||
|Openssl|latest is preferred|Generate certificate and keys for Harbor|
|
||||
|
||||
### Network ports
|
||||
|
@ -1,11 +1,14 @@
|
||||
### Setup
|
||||
In harbor.cfg, make sure the attribute ```ui_url_protocol``` is set to ```https```, and the attributes ```ssl_cert``` and ```ssl_cert_key``` are pointed to valid certificates. For more information about generating https certificate please refer to: [Configuring HTTPS for Harbor](configure_https.md)
|
||||
|
||||
In harbor.yml, make sure https is enabled, and the attributes `ssl_cert` and `ssl_cert_key` are pointed to valid certificates. For more information about generating https certificate please refer to: [Configuring HTTPS for Harbor](configure_https.md)
|
||||
|
||||
### Copy Root Certificate
|
||||
Suppose the Harbor instance is hosted on a machine ```192.168.0.5```
|
||||
If you are using a self-signed certificate, make sure to copy the CA root cert to ```/etc/docker/certs.d/192.168.0.5/``` and ```~/.docker/tls/192.168.0.5:4443/```
|
||||
|
||||
Suppose the Harbor instance is hosted on a machine `192.168.0.5`
|
||||
If you are using a self-signed certificate, make sure to copy the CA root cert to `/etc/docker/certs.d/192.168.0.5/` and `~/.docker/tls/192.168.0.5:4443/`
|
||||
|
||||
### Enable Docker Content Trust
|
||||
|
||||
It can be done via setting environment variables:
|
||||
|
||||
```
|
||||
@ -14,6 +17,7 @@ export DOCKER_CONTENT_TRUST_SERVER=https://192.168.0.5:4443
|
||||
```
|
||||
|
||||
### Set alias for notary (optional)
|
||||
|
||||
Because by default the local directory for storing meta files for notary client is different from docker client. If you want to use notary client to manipulate the keys/meta files generated by Docker Content Trust, please set the alias to reduce the effort:
|
||||
|
||||
```
|
||||
|
@ -117,7 +117,7 @@ function check_docker {
|
||||
function check_dockercompose {
|
||||
if ! docker-compose --version &> /dev/null
|
||||
then
|
||||
error "Need to install docker-compose(1.23.0+) by yourself first and run this script again."
|
||||
error "Need to install docker-compose(1.18.0+) by yourself first and run this script again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -129,9 +129,9 @@ function check_dockercompose {
|
||||
docker_compose_version_part2=${BASH_REMATCH[3]}
|
||||
|
||||
# the version of docker-compose does not meet the requirement
|
||||
if [ "$docker_compose_version_part1" -lt 1 ] || ([ "$docker_compose_version_part1" -eq 1 ] && [ "$docker_compose_version_part2" -lt 23 ])
|
||||
if [ "$docker_compose_version_part1" -lt 1 ] || ([ "$docker_compose_version_part1" -eq 1 ] && [ "$docker_compose_version_part2" -lt 18 ])
|
||||
then
|
||||
error "Need to upgrade docker-compose package to 1.23.0+."
|
||||
error "Need to upgrade docker-compose package to 1.18.0+."
|
||||
exit 1
|
||||
else
|
||||
note "docker-compose version: $docker_compose_version"
|
||||
|
@ -41,12 +41,12 @@ def validate(conf, **kwargs):
|
||||
redis_host = conf.get("redis_host")
|
||||
if redis_host is None or len(redis_host) < 1:
|
||||
raise Exception(
|
||||
"Error: redis_host in harbor.cfg needs to point to an endpoint of Redis server or cluster.")
|
||||
"Error: redis_host in harbor.yml needs to point to an endpoint of Redis server or cluster.")
|
||||
|
||||
redis_port = conf.get("redis_port")
|
||||
if redis_host is None or (redis_port < 1 or redis_port > 65535):
|
||||
raise Exception(
|
||||
"Error: redis_port in harbor.cfg needs to point to the port of Redis server or cluster.")
|
||||
"Error: redis_port in harbor.yml needs to point to the port of Redis server or cluster.")
|
||||
|
||||
|
||||
def parse_versions():
|
||||
|
@ -57,12 +57,12 @@ def validate(conf, **kwargs):
|
||||
redis_host = conf.get("configuration", "redis_host")
|
||||
if redis_host is None or len(redis_host) < 1:
|
||||
raise Exception(
|
||||
"Error: redis_host in harbor.cfg needs to point to an endpoint of Redis server or cluster.")
|
||||
"Error: redis_host in harbor.yml needs to point to an endpoint of Redis server or cluster.")
|
||||
|
||||
redis_port = conf.get("configuration", "redis_port")
|
||||
if len(redis_port) < 1:
|
||||
raise Exception(
|
||||
"Error: redis_port in harbor.cfg needs to point to the port of Redis server or cluster.")
|
||||
"Error: redis_port in harbor.yml needs to point to the port of Redis server or cluster.")
|
||||
|
||||
redis_db_index = conf.get("configuration", "redis_db_index").strip()
|
||||
if len(redis_db_index.split(",")) != 3:
|
||||
|
@ -24,7 +24,7 @@ def main():
|
||||
input_version = utils.get_conf_version(args.input_path)
|
||||
curr_dir = os.path.dirname(__file__)
|
||||
if input_version == target_version:
|
||||
print ("Version of input harbor.cfg is identical to target %s, no need to upgrade" % input_version)
|
||||
print ("Version of input harbor.yml is identical to target %s, no need to upgrade" % input_version)
|
||||
sys.exit(0)
|
||||
if args.output_path is None:
|
||||
if float(input_version[:input_version.rfind('.')]) < 1.8 and \
|
||||
|
Loading…
Reference in New Issue
Block a user