Skip to content

narcis-serbanescu/jnks_node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 

Repository files navigation

jnks_node

Jenkins SSH based Agent Docker/Podman image

  • RHEL8 based container acting as Jenkins agent, with Ansible, Terraform, Helm, kubectl

Description

The container built from this image is intended to be use on a RHEL7 system that by default does not contain podman-remote package.
In this case the only option to run a container agent is to use SSH, according to: https://www.jenkins.io/doc/book/using/using-agents/

This is a base image for Docker/Podman, which includes:

Usage

  1. Building a container from Dockerfile:
podman build --no-cache --squash-all -t jenkins-ansible-ssh-agent -f Containerfile
  1. The container can be launched externally and attaches to Jenkins.
podman run -d --privileged --volume=$(pwd)/ansible:/home/jenkins/ansible -p 2222:22 --name jenkins-ansible-ssh-agent localhost/jenkins-ansible-ssh-agent    

after setting Remote root directory to /home/jenkins.

  1. Execute ansible-playbook
podman exec -u=jenkins -w=/home/jenkins/ansible/ --tty jenkins-ansible-ssh-agent env TERM=xterm ansible-playbook get_facts.yml            
  1. As another option, the same container can be also attached from a Jenkins pipeline as well

About

Jenkins SSH based Agent Docker/Podman image

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published