Skip to content

Commit

Permalink
Fix lint issues in the documentation.
Browse files Browse the repository at this point in the history
Signed-off-by: sugeesh chandraweera <csugeesh@vmware.com>
  • Loading branch information
sugeeshC committed Jun 27, 2024
1 parent daa6f3d commit e599874
Show file tree
Hide file tree
Showing 6 changed files with 188 additions and 193 deletions.
179 changes: 88 additions & 91 deletions docs/archive/doc/markdown/setup-cd-bamboo.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,99 +9,96 @@
- Java JDK 17 installed on the hatchery vm



## Environment setup
1. Open already created Bamboo project.
2. Click Create → Create deployment project.
2. Create a new local repository (e.g. **vro-local**) and add it to the virtual release repository (e.g. **libs-release**).
3. Add Name and select Build Plan with the shared artefacts (project build plan, will automatically appear in the drop-down form).
4. Click Add Environment.
5. Add the Environment name (leave the agent selection) and click Create.
6. Click on Set up tasks:
7. Add an Artefact download task and select the artefact you want to run with the installer (vRO package OR vRA package). Click Save.
8. Add SCP Task and provide the IP address of the hatchery ( Host field ). Provide login credentials (Username and Password ). Select again the artefact which will be copied and installed. Add Remote Path. For example /tmp/vra.zip
9. Add SSH Task. The task will connect to the hatchery and install the artefact.
The SSH command/script ( environment.properties section have to be modified accordingly to the specific project)


```
echo "On the hatchery server"
if [ ! -f /tmp/vra.zip ] ; then
echo "vRA deployment package bundle cannot be found as /tmp/vra.zip"
exit 1;
fi
rm -rf /tmp/vra-deployment
mkdir -p /tmp/vra-deployment
mv /tmp/vra.zip /tmp/vra-deployment
cd /tmp/vra-deployment
unzip vra.zip
if which java ; then
echo "Java is already available. No need to install it"
else
echo "No Java found. Trying to install it."
apt update
apt install default-jre -y
fi
java -version
mkdir -p /tmp/vra-deployment/bin
cd /tmp/vra-deployment/bin
cat << EOT > /tmp/vra-deployment/bin/environment.properties
http_connection_timeout=360
ignore_ssl_host_verification=false
vrang_port=443
vrang_org_id=9decff24-72f7-4b75-bc6d-804826c3d641
vrang_vro_integration_name=embedded-VRO
vrang_import_overwrite_mode=SKIP,OVERWRITE
http_socket_timeout=360
vrang_auth_with_refresh_token=false
vro_run_workflow=false
skip_vro_import_old_versions=true
vrang_username=configurationadmin
vro_delete_old_versions=false
vro_delete_include_dependencies=false
vra_ng_import_packages=true
vro_embedded=true
vrang_project.id=5a92f54e-0787-4034-9432-6b96d5477496
vrang_host=vra-l-01a.corp.local
vro_import_configuration_attribute_values=false
vrang_csp_host=vra-l-01a.corp.local
vro_import_packages=true
vro_enable_backup=true
ignore_ssl_certificate_verification=true
vrang_org_name=vidm-l-01a
vro_import_old_versions=false
vrang_project_name=Etisalat Private Cloud v3
vro_import_configuration_secure_attribute_values=false
vrang_password={PASS}Vk13YXJlMSE\=
EOT
echo "Using the following properties:"
cat /tmp/vra-deployment/bin/environment.properties
if [ ! -f /tmp/vra-deployment/bin/installer ] ; then
echo "/bin/install script does not exist in vra.zip deployment package."
exit 2
fi
chmod a+x /tmp/vra-deployment/bin/installer
cd /tmp/vra-deployment/bin/
./installer environment.properties
exitcode=$?
echo "Deployment finished with exit code $exitcode"
cd /tmp
if [ $exitcode -eq 0 ] ; then
rm -rf /tmp/vra-deployment
rm -rf /tmp/vra.zip
else
echo "Deployment finished with errors. Please review package content in folder /tmp/vra-deployment on the hatchery server"
fi
exit $exitcode
```
10. Optional: Trigger deployment after successful build:
3. Create a new local repository (e.g. **vro-local**) and add it to the virtual release repository (e.g. **libs-release**).
4. Add Name and select Build Plan with the shared artefacts (project build plan, will automatically appear in the drop-down form).
5. Click Add Environment.
6. Add the Environment name (leave the agent selection) and click Create.
7. Click on Set up tasks:
8. Add an Artefact download task and select the artefact you want to run with the installer (vRO package OR vRA package). Click Save.
9. Add SCP Task and provide the IP address of the hatchery ( Host field ). Provide login credentials (Username and Password ). Select again the artefact which will be copied and installed. Add Remote Path. For example /tmp/vra.zip
10. Add SSH Task. The task will connect to the hatchery and install the artefact.
The SSH command/script ( environment.properties section have to be modified accordingly to the specific project)
```bash
echo "On the hatchery server"

if [ ! -f /tmp/vra.zip ] ; then
echo "vRA deployment package bundle cannot be found as /tmp/vra.zip"
exit 1;
fi
rm -rf /tmp/vra-deployment
mkdir -p /tmp/vra-deployment
mv /tmp/vra.zip /tmp/vra-deployment
cd /tmp/vra-deployment
unzip vra.zip
if which java ; then
echo "Java is already available. No need to install it"
else
echo "No Java found. Trying to install it."
apt update
apt install default-jre -y
fi
java -version
mkdir -p /tmp/vra-deployment/bin

cd /tmp/vra-deployment/bin
cat << EOT > /tmp/vra-deployment/bin/environment.properties
http_connection_timeout=360
ignore_ssl_host_verification=false
vrang_port=443
vrang_org_id=9decff24-72f7-4b75-bc6d-804826c3d641
vrang_vro_integration_name=embedded-VRO
vrang_import_overwrite_mode=SKIP,OVERWRITE
http_socket_timeout=360
vrang_auth_with_refresh_token=false
vro_run_workflow=false
skip_vro_import_old_versions=true
vrang_username=configurationadmin
vro_delete_old_versions=false
vro_delete_include_dependencies=false
vra_ng_import_packages=true
vro_embedded=true
vrang_project.id=5a92f54e-0787-4034-9432-6b96d5477496
vrang_host=vra-l-01a.corp.local
vro_import_configuration_attribute_values=false
vrang_csp_host=vra-l-01a.corp.local
vro_import_packages=true
vro_enable_backup=true
ignore_ssl_certificate_verification=true
vrang_org_name=vidm-l-01a
vro_import_old_versions=false
vrang_project_name=Etisalat Private Cloud v3
vro_import_configuration_secure_attribute_values=false
vrang_password={PASS}Vk13YXJlMSE\=
EOT

echo "Using the following properties:"
cat /tmp/vra-deployment/bin/environment.properties

if [ ! -f /tmp/vra-deployment/bin/installer ] ; then
echo "/bin/install script does not exist in vra.zip deployment package."
exit 2
fi
chmod a+x /tmp/vra-deployment/bin/installer
cd /tmp/vra-deployment/bin/
./installer environment.properties

exitcode=$?

echo "Deployment finished with exit code $exitcode"

cd /tmp
if [ $exitcode -eq 0 ] ; then
rm -rf /tmp/vra-deployment
rm -rf /tmp/vra.zip
else
echo "Deployment finished with errors. Please review package content in folder /tmp/vra-deployment on the hatchery server"
fi

exit $exitcode
```
11. Optional: Trigger deployment after successful build:
Click Add trigger → Select trigger: After successful build plan.
On the next screen provide Trigger description, select the branch and click Save trigger.
60 changes: 31 additions & 29 deletions docs/archive/doc/markdown/setup-platform.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@
**Build Tools for VMware Aria Platform** provides set of infrastructure components supporting source control, artifact managment, build system and wiki to the vRrealize engineers.

## Table of Contents
1. [Installation](#Installation)
1. [Requirements](#requirements)
2. [Installation](#installation)
3. [Upload vRO artifacts to Artifactory](#upload-vro-artifacts-to-artifactory)

### Requirements
## Requirements
- Git-based Source control system (we assume Gitlab)
- CI Server capable of running Maven commands (we assume Gitlab):
- Git client
- Maven 3.5+
- Java 17
- NodeJS 16.12+ (NPM 6.7+)
- (Optional) PowerShell version 6+ (recommended 7.2.3+) is required for supporting powershell polyglot projects.
- Git client
- Maven 3.5+
- Java 17
- NodeJS 16.12+ (NPM 6.7+)
- (Optional) PowerShell version 6+ (recommended 7.2.3+) is required for supporting powershell polyglot projects.
- Temporary access to internet during the installation
- vRO 7.3.0 Appliance - the toolchain uses vRO 7.3.0 dependencies that are part of the appliance and are served as an embedded Maven repository.

Expand All @@ -21,15 +23,15 @@
### Uploading toolchain artifacts to Artifactory
_Note that the libs-release, libs-snapshot etc. are the default Maven repositories created by JFrog's **Quick Setup** shown at first login. This guide assumes that this **Quick Setup** has been executed._
1. Create a local repository in artifactory to contain the toolchain artifacts, e.g. **vrealize-build-tools** and add it to the virtual release repository (e.g. **libs-release**)
3. Unzip **iac-maven-repository.zip** found at **artifacts/maven/** path relative to the root of the toolchain bundle to a folder, e.g. **import/**
4. Go to the directory where you have unzipped the archive. Your working directory should contain the "com" folder and the **archetype-catalog.xml** file, e.g.:
```bash
root@photon-G6H8GzV2j [ ~/toolchain/import ]# ls
archetype-catalog.xml com
```
5. Then, run the following command ``jfrog rt u --recursive=true --flat=false ./* vrealize-build-tools``, where **vrealize-build-tools** should be the name of the repository you've created at step #1.
6. Examine the output of the command. It should look something similar to this:
```
2. Unzip **iac-maven-repository.zip** found at **artifacts/maven/** path relative to the root of the toolchain bundle to a folder, e.g. **import/**
3. Go to the directory where you have unzipped the archive. Your working directory should contain the "com" folder and the **archetype-catalog.xml** file, e.g.:
```bash
root@photon-G6H8GzV2j [ ~/toolchain/import ]# ls
archetype-catalog.xml com
```
4. Then, run the following command ``jfrog rt u --recursive=true --flat=false ./* vrealize-build-tools``, where **vrealize-build-tools** should be the name of the repository you've created at step #1.
5. Examine the output of the command. It should look something similar to this:
```text
Uploading artifact: /path/to/artifact/some-artifact.jar
{
"status": "success",
Expand All @@ -43,21 +45,21 @@ Uploading artifact: /path/to/artifact/some-artifact.jar
## Upload vRO artifacts to Artifactory
First you need access to a 7.3.0 vRO appliance to get the vRO dependencies for the toolchain in your artifactory.
1. Get all vRO artifacts on the local machine. Run:
```
wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://<vro_ip>:<vro_port>/vco-repo/com/
wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://<vro_ip>:<vro_port>/vco-repo/com/vmware/o11n/mojo/pkg/
wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://<vro_ip>:<vro_port>/vco-repo/com/vmware/o11n/pkg
```
```bash
wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://<vro_ip>:<vro_port>/vco-repo/com/
wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://<vro_ip>:<vro_port>/vco-repo/com/vmware/o11n/mojo/pkg/
wget --no-check-certificate --recursive --no-parent --reject "index.html*" https://<vro_ip>:<vro_port>/vco-repo/com/vmware/o11n/pkg
```
2. Create a new local repository (e.g. **vro-local**) and add it to the virtual release repository (e.g. **libs-release**).
3. Navigate to the root folder of the downloaded repository on the local filesystem - at the same level as the **com** directory. E.g.:
```bash
root@photon-G6H8GzV2j [ ~/192.168.71.1/vco-repo ]# ls
com
```
```bash
root@photon-G6H8GzV2j [ ~/192.168.71.1/vco-repo ]# ls
com
```
4. Import the vro artifacts to the selected repository, for example:
```
jfrog rt u --recursive true --flat false ./* vro-local
```
```bash
jfrog rt u --recursive true --flat false ./* vro-local
```
### Configure permissions for local cache for the Anonymous user
1. Login into Artifactory with admin privileges
Expand All @@ -70,5 +72,5 @@ jfrog rt u --recursive true --flat false ./* vro-local
8. Give **Deploy/Cache, Annotate, Read** permissions
9. Click **Save & Finish**
# Next step
## Next step
- Configure developer **[Build Tools for VMware Aria Workstation](setup-workstation.md)**
Loading

0 comments on commit e599874

Please sign in to comment.