-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[area/documentation] (#162) Minimal infrastructure setup update #384
base: main
Are you sure you want to change the base?
Conversation
infrastructure/.m2/settings.xml
Dismissed
<repository> | ||
<id>releases</id> | ||
<name>pscoe</name> | ||
<url>http://infra.corp.local/nexus/repository/maven-releases/</url> | ||
<releases> | ||
<enabled>true</enabled> | ||
</releases> | ||
<snapshots> | ||
<enabled>false</enabled> | ||
</snapshots> | ||
</repository> |
Check failure
Code scanning / CodeQL
Failure to use HTTPS or SFTP URL in Maven artifact upload/download High
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ivan-zdravkov @ivo-kotev @Michaelpalacce those https alerts should be safe to dismiss in this specific case right? this is adding the basic configuration to get things running and it can later be updated easily based on customer preference
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@VenelinBakalov, yes exactly. We are overriding this security requirement in the settings.xml itself (Maven requires https) as well since this is strictly internal traffic. Maybe we should make a note of that in the documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm 50/50 on the matter. We should be able to serve HTTPS with self-signed certificates. But either work for me. The error itself is whatever in this case, but at the same time https > http even for this
@@ -1,6 +0,0 @@ | |||
# vRA IaaC START SECTION |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see we are removing this file, are things working without it? is it the "extra_hosts" property the one that replaces hosts configuration (just note, i am asking because I don't have a lot of knowledge in this area and not as a change request for the pr)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, we don't need this. I initially tried getting it to work, but never could. It appeared to be obsolete even initially, since we are not using the thus defined hosts, but instead the base infra.corp.local. Docker compose configures internal image-to-image hosts and addresses and on the host machine we only need the infra.corp.local 127.0.0.0 binding.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see thanks.
infrastructure/readme.md
Outdated
* 172.18.0.11 - gitlab.corp.local (GitLab CE) | ||
* 172.18.0.12 - gitlab-runner.corp.local (GitLab CI Runner) | ||
* 172.18.0.13 - artifactory.corp.local (JFrog Artifactory) | ||
Using these applications, the infrastructure will support source control, running the build pipeline as well as hosting and serving the artifact packages, which are all the minimal requirements to have an [Aria Build Tools](../README.md) project. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using these applications, the infrastructure will support source control, running the build pipeline as well as hosting and serving the artifact packages, which are all the minimal requirements to have an [Aria Build Tools](../README.md) project. | |
Using these applications, the infrastructure will support source control, running the build pipeline as well as hosting and serving the artifact packages, which are all the minimal requirements to have an [Build Tools for VMware Aria](../README.md) project. |
infrastructure/readme.md
Outdated
|
||
2. Navigate to the `infrastructure` folder: | ||
``` | ||
cd infrastructure |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cd infrastructure | |
cd build-tools-for-vmware-aria/infrastructure |
ports: | ||
- "127.0.0.1:8080:80" | ||
- 8082:80 # Web Interface |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting but for the gitlab-ce i got an error: "ERROR: for gitlab Cannot create container for service gitlab: invalid port specification: "481342"
In order to fix it, I had to use quotes. I am not sure why it happened only for this container..
ports:
- "8082:80" # Web Interface
- "8022:22" # SSH
I will be updating the guide for Linux and update the Installation section to drop the Docker Desktop dependencies |
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
3451d96
to
44af649
Compare
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
The minimal infrastructure documentation now guides us through setting up all the application docker containers that host the infrastructure, the connectivity and application access, the dev environment, creating a project from archetypes, running and testing the project locally, setting up the GitLab CI/CD pipeline, and finally building, deploying and pushing artifacts. Shell file removed as it is no longer needed. docker-compose updated to work with nginx, nexus, gitlab, and a custom gitlab-runner. .m2/settings.xml added to the infrastructure folder. gitlab-runner Dockerfile added with openjdk, maven and nodejs on top. nginx configuration changed. Fixed #162 Signed-off-by: Ivan Zdravkov <[email protected]>
44af649
to
cf42598
Compare
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
- echo "GROUP_ID=$(mvn help:evaluate -Dexpression=project.groupId -q -DforceStdout)" >> build.env | ||
- echo "ARTIFACT_ID=$(mvn help:evaluate -Dexpression=project.artifactId -q -DforceStdout)" >> build.env | ||
- echo "PROJECT_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> build.env | ||
artifacts: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason the artifacts
part fails to execute
WARNING: Uploading artifacts as "dotenv" to coordinator... POST http://infra.corp.local/gitlab/api/v4/jobs/1/artifacts: 400 Bad Request (Invalid Format) id=1 responseStatus=400 Bad Request status=400 token=glcbt-64
FATAL: invalid argument
ERROR: Job failed: exit status 1
Commenting this out makes the build successful
test: | ||
stage: test | ||
script: | ||
- mvn test |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- mvn test | |
- mvn -Dmaven.repo.local=$CI_PROJECT_DIR/.m2/repository test |
<repositories> | ||
<repository> | ||
<id>releases</id> | ||
<name>pscoe</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<name>pscoe</name> | |
<name>maven-releases</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if the name here needs to match the name in nexus but if it does, we can update it
</repository> | ||
<repository> | ||
<id>snapshots</id> | ||
<name>pscoe</name> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<name>pscoe</name> | |
<name>maven-snapshots</name> |
Signed-off-by: Ivan Zdravkov <[email protected]>
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Signed-off-by: Ivan Zdravkov <[email protected]>
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
Signed-off-by: Ivan Zdravkov <[email protected]>
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
1 similar comment
@ivan-zdravkov, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding
|
<profiles> | ||
<profile> | ||
<id>nexus</id> | ||
<repositories> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<repositories> | |
<properties> | |
<releaseRepositoryUrl> | |
http://infra.corp.local/nexus/repository/maven-releases/</releaseRepositoryUrl> | |
<snapshotRepositoryUrl> | |
http://infra.corp.local/nexus/repository/maven-snapshots/</snapshotRepositoryUrl> | |
</properties> | |
<repositories> |
<settings xmlns="http://maven.apache.org/SETTINGS/1.1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.1.0 http://maven.apache.org/xsd/settings-1.1.0.xsd"> | ||
<servers> | ||
<server> | ||
<id>nexus</id> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<id>nexus</id> | |
<id>releases</id> |
And we need to add 1 more similar server with id snapshots
<server>
<id>snapshots</id>
<username>admin</username>
<password>VMware1!</password>
</server>
Description
The minimal infrastructure documentation now guides us through setting up all the application docker containers that host the infrastructure, the connectivity and application access, the dev environment, creating a project from archetypes, running and testing the project locally, setting up the GitLab CI/CD pipeline, and finally building, deploying and pushing artifacts.
Shell file removed as it is no longer needed.
docker-compose updated to work with nginx, nexus, gitlab, and a custom gitlab-runner.
.m2/settings.xml added to the infrastructure folder.
gitlab-runner Dockerfile added with openjdk, maven and nodejs on top.
nginx configuration changed.
Checklist
Fixed #XXX -
orClosed #XXX -
prefix to auto-close the issueTesting
Full testing can be done by following the changed Readme.md as that is the intention of the changes.
Release Notes
The minimal infrastructure guide updated and simplified to better lead adoption.
Related issues and PRs
#162