Home > Blockchain >  Container and MS SQL guide?
Container and MS SQL guide?

Time:04-16

I've managed to get a basic Rundeck docker container up and running using docker-compose. Through that I have a Docker volume configured for some persistent storage. I'd really like to connect to my SQL cluster as well. I'm hoping to get to the point where my Rundeck container really is ephemeral and any data I need for a new container to run the same is stored externally.

Does the Rundeck Community container support MS SQL out of the box? Do I need to install additional dependencies? I'm also not using SQL authentication on my cluster, but I have created a service account for the container to use.

Thanks for any tips/suggestions.

CodePudding user response:

Rundeck OSS is compatible with Microsoft SQL Server out of the box, let's do a quick test using docker-compose against an "external" (simulated) MSSQL backend.

  1. Create a docker network:
docker network create mssql-net
  1. Create an "external" MSSQL backend:
docker run -e "ACCEPT_EULA=Y" -e "SA_PASSWORD=MyPass--" -e "MSSQL_PID=Express" -p 1434:1433 -d --network mssql-net --name mssql mcr.microsoft.com/mssql/server:2017-latest-ubuntu
  1. Now the Rundeck docker-compose.yml file to use the "external" MSSQL database:
version: "3"
services:
  rundeck:
    image: rundeck/rundeck:4.0.1
    environment:
      RUNDECK_GRAILS_URL: http://localhost:4440
      RUNDECK_DATABASE_DRIVER: com.microsoft.sqlserver.jdbc.SQLServerDriver
      RUNDECK_DATABASE_USERNAME: sa
      RUNDECK_DATABASE_PASSWORD: MyPass--
      RUNDECK_DATABASE_URL: jdbc:sqlserver://mssql:1433;DatabaseName=tempdb
    ports:
      - 4440:4440
    networks:
      - mssql-net
networks:
  mssql-net:
    external: true
  1. Start the Rundeck container:
docker-compose up
  1. Enter Rundeck and see the Data Source section (up to right gear icon > System Configuration), now Rundeck is using MS SQL Server.

Very importantly, Rundeck doesn't support group replication right now, please take a look at this.

  • Related