'ContainerRegistry|Wildcards such as %{codeStart}*-stable%{codeEnd} or %{codeStart}production/*%{codeEnd} are supported. To select all tags, use %{codeStart}.*%{codeEnd}',
'ContainerRegistry|Wildcards such as %{codeStart}*-stable%{codeEnd} or %{codeStart}production/*%{codeEnd} are supported. To select all tags, use %{codeStart}.*%{codeEnd}',
# Installing GitLab HA on Amazon Web Services (AWS)
DANGER: **Danger:** This guide is under review and the steps below will be revised and updated in due time. For more detail, please see [this epic](https://gitlab.com/groups/gitlab-org/-/epics/912).
This page offers a walkthrough of a common HA (Highly Available) configuration
for GitLab on AWS. You should customize it to accommodate your needs.
@@ -48,8 +48,6 @@ However, DAST can be [configured](#full-scan)
to also perform a so-called "active scan". That is, attack your application and produce a more extensive security report.
It can be very useful combined with [Review Apps](../../../ci/review_apps/index.md).
The [`dast`](https://gitlab.com/gitlab-org/security-products/dast/container_registry) Docker image in GitLab container registry is updated on a weekly basis to have all [`owasp2docker-weekly`](https://hub.docker.com/r/owasp/zap2docker-weekly/) updates in it.
## Use cases
It helps you automatically find security vulnerabilities in your running web
[Deploy tokens](../../project/deploy_tokens/index.md) and regular username/password
credentials do not work.
...
...
@@ -92,7 +159,9 @@ You can read more on
## Configuring your project to use the GitLab Maven repository URL
To download and upload packages from GitLab, you need a `repository` and
`distributionManagement` section in your `pom.xml` file.
`distributionManagement` section in your `pom.xml` file. If you're following the
steps from above, then you'll need to add the following information to your
`my-project/pom.xml` file.
Depending on your workflow and the amount of Maven packages you have, there are
3 ways you can configure your project to use the GitLab endpoint for Maven packages:
...
...
@@ -133,7 +202,7 @@ would look like:
```
The `id` must be the same with what you
[defined in `settings.xml`](#authenticating-to-the-gitlab-maven-repository).
[defined in `settings.xml`](#adding-the-gitlab-package-registry-as-a-maven-remote).
Replace `PROJECT_ID` with your project ID which can be found on the home page
of your project.
...
...
@@ -186,7 +255,7 @@ the `distributionManagement` section:
```
The `id` must be the same with what you
[defined in `settings.xml`](#authenticating-to-the-gitlab-maven-repository).
[defined in `settings.xml`](#adding-the-gitlab-package-registry-as-a-maven-remote).
Replace `my-group` with your group name and `PROJECT_ID` with your project ID
which can be found on the home page of your project.
...
...
@@ -241,7 +310,7 @@ the `distributionManagement` section:
```
The `id` must be the same with what you
[defined in `settings.xml`](#authenticating-to-the-gitlab-maven-repository).
[defined in `settings.xml`](#adding-the-gitlab-package-registry-as-a-maven-remote).
Replace `PROJECT_ID` with your project ID which can be found on the home page
of your project.
...
...
@@ -257,17 +326,85 @@ project's ID can be used for uploading.
## Uploading packages
Once you have set up the [authentication](#authenticating-to-the-gitlab-maven-repository)
and [configuration](#configuring-your-project-to-use-the-gitlab-maven-repository-url),
Once you have set up the [remote and authentication](#adding-the-gitlab-package-registry-as-a-maven-remote)
and [configured your project](#configuring-your-project-to-use-the-gitlab-maven-repository-url),
test to upload a Maven artifact from a project of yours:
```shell
mvn deploy
```
If the deploy is successful, you should see the build success message again:
```shell
...
[INFO] BUILD SUCCESS
...
```
You should also see that the upload was uploaded to the correct registry:
```shell
Uploading to gitlab-maven: https://gitlab.com/api/v4/projects/PROJECT_ID/packages/maven/com/mycompany/mydepartment/my-project/1.0-SNAPSHOT/my-project-1.0-20200128.120857-1.jar
```
You can then navigate to your project's **Packages** page and see the uploaded
artifacts or even delete them.
## Installing a package
Installing a package from the GitLab Package Registry requires that you set up
the [remote and authentication](#adding-the-gitlab-package-registry-as-a-maven-remote)
as above. Once this is completed, there are two ways for installaing a package.
### Install with `mvn install`
Add the dependency manually to your project `pom.xml` file. To add the example
created above, the XML would look like:
```xml
<dependency>
<groupId>com.mycompany.mydepartment</groupId>
<artifactId>my-project</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
```
Then, inside your project, run the following:
```shell
mvn install
```
Provided everything is set up correctly, you should see the dependency
downloaded from the GitLab Package Registry:
```shell
Downloading from gitlab-maven: http://gitlab.com/api/v4/projects/PROJECT_ID/packages/maven/com/mycompany/mydepartment/my-project/1.0-SNAPSHOT/my-project-1.0-20200128.120857-1.pom
```
### Install with `mvn dependency:get`
The second way to install packages is to use the Maven commands directly.