Rundeck Docker Run Plugin

Hello guys,

I saw this video of Rundeck on youtube and testing it. But I didn’t see any plugin that work for Docker Run step. https://www.youtube.com/watch?v=KiezNnXYBH4
Is there any plugin for docker run step ?

Hi Tun!

Yes, the plugin is available here, and here you can download it. You can put the zip file ( docker-container-1.4.5.zip) on the libext directory or upload it directly through Plugin Manager (Gear Icon > Plugins > Upload Plugin).

After that, the docker steps are available for any job.

Hope it helps!

Hello Reiner,

I saw that plugin already. This is a built in plugin for enterprise right? But I didn’t see docker either in work flow step or node step.

Best Regards,
Tun Lyin Aung

Attached my screen recording as a proof.

Hi Tun, the plugin isn’t built with PagerDuty Process Automation On Prem (formerly “Rundeck Enterprise”). To use it please install it following my first answer.

Hi Reiner,
now , I see the workflow step but I got errors when I run. I think that error is because of no sudo access. But I have sudo access for ec2-user. You can see first workflow step that creates file in root directory using sudo access is Okay. But the docker run image step failed. Can you guide me please? I attached my screenshots to check.


Hi Tun, a good approach is to add the rundeck user to the docker group to run docker commands. Take a look at this.

Hello Reiner,

I just followed your guidance and add rundeck user to the docker group. rundeck user can now run docker without sudo in terminal. But with docker plugin, there’s still permission denied error. I will attach my screenshots.



Hi Tun,

I replicated your scenario :slight_smile: you need to restart the rundeck service to take the rundeck user session changes.

Here is a step-by-step from scratch using the Amazon Linux EC2 image:

  1. Update the whole system: sudo yum -y update
  2. Install docker: sudo yum install docker
  3. Check the Docker installation: sudo docker ps
  4. Install OpenJDK 11 (required by Rundeck): amazon-linux-extras install java-openjdk11
  5. Install rundeck following this.
  6. Configure framework.properties and rundeck-config.properties files accordingly to your external DNS/IP info.
  7. Start the Rundeck instance: systemctl start rundeckd
  8. Access the Rundeck instance, create a Project, then use this Job Definition to test:
- defaultTab: nodes
  description: ''
  executionEnabled: true
  id: bae6117f-d85e-478a-b333-356d3568816d
  loglevel: INFO
  name: LaunchNGINX
  nodeFilterEditable: false
  plugins:
    ExecutionLifecycle: null
  scheduleEnabled: true
  sequence:
    commands:
    - configuration:
        debug: 'false'
        image: nginx:alpine
        name: nginx
        publish: 8080:80
      nodeStep: true
      type: docker-run-workflow-step
    keepgoing: false
    strategy: node-first
  uuid: bae6117f-d85e-478a-b333-356d3568816d

See the permissions error.

  1. Add the rundeck user to docker group: usermod -a -G docker rundeck
  2. Running the same job, you will see the same permissions error.
  3. Restart the Rundeck instance: systemctl restart rundeckd
  4. Run the job again, now, you can use the Docker steps without any problem.

Hope it helps!

1 Like

Hello Reiner,

The permission denied error is completely okay now. Can I ask how to use running docker container as our nodes. Is there any example for these parameters please ?

Hello Reiner,

Now it’s okay to use running containers as nodes. I got it now. Can you help me one more please? Is there any plugin related in the following screenshot please? I searched it in the rundeck plugin site and I didn’t see any. It would be great if you help me along with this.

Hi Tun,

That’s an old custom plugin for an ancient Rundeck version, currently, you can use the SQL Runner plugin (built-in with Process Automation) to use against your rdbs, or create a custom plugin following this. Also you can use an script step to extract that data like this.

Regards!

1 Like

Hello Reiner,

I will figure it out the SQL Runner plugin. Thank you for your time and guidance for these issues. Really appreciate it.

Best Regards,
Tun Lyin Aung

1 Like

Anytime Tun! :slight_smile: :+1:

1 Like