bcgov / nr-spar-data-sync

Engine to sync data for SPAR application (from Postgres to Oracle)
Apache License 2.0
2 stars 0 forks source link

Containerization for Jenkins Polaris access by podman agent #26

Closed marcionemec-daitan closed 5 months ago

marcionemec-daitan commented 6 months ago

Situation:

While trying to build/deploy the Vault issue solution (see bcgov/nr-spar-data#47 issue), Jenkins Cron server raised error trying to connect in github.com. This error is impeditive to deploy the pipeline of the project.

Asking to 1Team for a guidance, the team suggested us to use the Jenkins [Polaris server:](Polaris Jenkins: https://apps.nrs.gov.bc.ca/int/confluence/display/1TEAM/Polaris+Jenkins)

So, to use the Jenkins Polaris server, Data Sync Engine needs to be containerized to be build/deployed

Background:

Although we already had used a dockerized approach to test issues, the code itself was build inside the Jenkins server instance, using the configuration "agent:all" . To avoid security issues, 1Team asked us to use "agent:podman" configuration.

Analysis:

To use podman, we need to intall it in a Ubuntu version 20.10 or newer. As our previous Ubuntu version in a WLS Windows system was 20.04, it was needed to upgrade the version. More info here.

Other issue is: Jenkins Cron is based in a Windows System, so, Jenkins file pipeline configuration uses the "Windows batch" command. But Jenkins Polaris is based in a Linux system, so pipeline configuration needs to be handled using sh/bash commands.

The jenkins file translation would be handled by issue bcgov/nr-spar-data-sync#27 .

craigyu commented 5 months ago

rolled over from Sprint 24

marcionemec-daitan commented 5 months ago

As bcgov/nr-spar-data-sync#27 issue was solved, including a solution for this current ticket (Jenkins Cron file migration to Jenkins Polaris) this ticket will handle all documentation about the changes in confluence page.

Be warned: migration is only to bring minimal code execution into new environment. Vault and secrets management will be handled in bcgov/nr-spar-data#47 issue.

marcionemec-daitan commented 5 months ago

Documentation can be found in: https://apps.nrs.gov.bc.ca/int/confluence/display/FSADT2/Jenkins+configuration

Closing ticket.