Create projects

Create projects

To create Projects in the Rundeck service:

  1. Use the following structure to configure projects through pillar parameters:

    parameters:
      rundeck:
        client:
          project:
            test_project:
              description: PROJECT_DECRIPTION
              node:
                node01:
                  nodename: NODE_NAME
                  hostname: HOST_NAME
                  username: USER_NAME
                  tags: TAGS
    

    For example:

    parameters:
      rundeck:
        client:
          project:
            test_project:
              description: "Test project"
              node:
                node01:
                  nodename:node-1
                  hostname: 10.20.0.1
                  username: runbook
                  tags: [cicd, docker]
                node02:
                  nodename: node-2
                  hostname: 10.20.0.2
                  username: runbook
                  tags: [cicd, docker]
                node03:
                  Nodename: node-3
                  hostname: 10.20.0.3
                  username: runbook
                  tags: [cicd, docker]
    

    All configured nodes in a particular project are available to run jobs and commands within this project. Also, nodes can be tagged that allows for filtering when executing commands and jobs on nodes.

  2. The Rundeck metadata has a preconfigured user to access other nodes. The user is called runbook. You need to configure it on nodes before you can use jobs or commands in projects. To configure the runbook user, inherit classes of your nodes from the following class specifying the rundeck_runbook_public_key and rundeck_runbook_private_key parameters:

    classes:
      - system.rundeck.client.runbook
    
  3. Apply the linux and openssh states:

    salt '*' state.sls linux.system.user
    salt '*' state.sls openssh.server