This documentation supports an earlier version of BMC Helix IT Service Management on-premises deployment.

To view the documentation for the latest version, select 22.1.06 from the Product version picker.

Setting up BMC Deployment Engine

Set up BMC Deployment Engine before deploying BMC Helix IT Service Management. 


The steps to set up BMC Deployment Engine are shown in the following figure:


Before you begin

Ensure that your system meets the following requirements for the Jenkins server: 

Component

Node

vCPU

Operating System

RAM (GB)

Disk (GB)

Jenkins server

1

4

  • Cent OS 7.x and RHEL 7.x are certified.

  • Equivalent releases of Fedora and Oracle Linux are supported.

Minimum 16 GB

200

For Kubernetes cluster requirements, see System Requirements.

Important

  • To login to the Jenkins server, use SSH clients, such as PuTTY, MobaXterm, or mRemoteNG.

  • By default, all the commands must be executed as non root user and the non root user must have sudo access.

  • Unless specified, user refers to non root user for this setup.

  • Make sure that the user has default shell as sh or bash.

  • Make sure that during configuration of Jenkins server and pipeline, the system has access to the Jenkins repository to automatically install all required plug-ins for a Jenkins pipeline.

  • The nomenclature used in pipeline development is as follows:

    • The Home directory of non root user is referred to as <HOME> in all subsequent steps. By default, it is /home/git.

    • Owner of git repository as well as owner of Jenkins is the same, which is the non root user referred to as <user>. By default, it is git.

    • <hostname> is the host name of Deployment Engine server, which is resolvable by all the servers in this environment.

    • <GIT_REPO_DIR> is the location of local git repository or it can be created in <HOME>.

    • <Library_REPO_DIR> is the location of the local library repositories.

To create a non root user for Jenkins deployment

  1. Create a user by running the following command:

    sudo adduser git -m --home-dir /home/git
    sudo passwd git

    Enter the password for git user.

    Important

    Please consult with your system administrator to provide sudo access to user provisioned in the Step 1.

    Do not use @ character in the password value.

  2. Login as git user.

    su - git

Perform the setup described in the following sections as git user.

To update Jenkins server with latest patches

Make sure that the Jenkins server is updated with the latest patches.

sudo yum update -y 
sudo yum upgrade

Back to top

Install prerequisite software

Perform the following tasks to install the prerequisite software.

To install EPEL-Repository


  1. Download the latest Epel-release by using the following command:

    sudo wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
  2. Install Epel-release by using the following commands:

    sudo yum install -y ./epel-release-latest-*.noarch.rpm

    Back to top

To install Python

  1. Check whether you already have Python installed.
    The installer currently uses Python 2 only.

    # Check the system Python version 
    python --version 
    # Check the system Python 2 version 
    python2 --version 
    # Check the system Python 3 version 
    python3 --version
  2. If needed, install Python by using the following command:

    sudo yum install -y python

    Back to top

To install Git

  1. Check if you already have Git installed on the Jenkins server.

    git --version
  2. If you do not have Git installed, run the following command:

    sudo yum install git -y

    Back to top

To set up the Git server


  1. Create the local Git repositories as follows: 

    1. From EPD, download BMC_Remedy_Deployment_Manager_Configuration_Release_21.05.02.zip.

    2. Copy this zip file to Deployment Engine server's git user's home directory by using tools, such as FileZilla or WinSCP.

      Important

      Make sure that minimum 60 GB space is available in the Deployment Engine server's git user's home directory.


    3. Login to Jenkins server with your user credentials.
      Run the following commands.

      mkdir -p <GIT_REPO_DIR>
      cd <GIT_REPO_DIR>
      mv <GIT_REPO.zip-location> .
      unzip BMC_Remedy_Deployment_Manager_Configuration_Release_21.05.02.zip
      sudo chown -R git:git *
    4. Make sure that the following folders are extracted from the unzip command in Step 1c:

      • DEVOPS_REPO (ITSM_REPO)

      • PLAYBOOKS_REPO

      • CUSTOMER_CONFIGS

      • HELM_REPO

      • SMARTAPPS_HELM_REPO

  2. Unzip the Pipeline Library repository to create the local library repositories.

    cd <GIT_REPO_DIR> 
    mkdir <Library_REPO_DIR> 
    cd <Library_REPO_DIR> 
    cp <Library_REPO.zip> . 
    unzip <Library_REPO.zip>
  3. Run the following command:

    cd <Library_REPO> 
    sudo chown -R git:git .

    The following Library repositories are created:

    • pipeline-framework

    • JENKINS-27413-workaround-library

Back to top

To set up the Git Client

This procedure configures passwordless access for the Jenkins pipeline.

  1. Copy Jenkins server's ssh key to git user's known host file by using the following command:

    sudo ssh-keygen 
    ssh-keygen
    1. This command prompts for location to save the key. By default, it is kept in /root/.ssh/id_rsa.

    2. Press Enter to accept the default values

    3. Leave the passphrase blank. 

      If a password is provided here, the execution of the Jenkins pipelines will be impacted.

  2. Provide the password for the git user.

    sudo ssh-copy-id git@<jenkins_server_name> 
    ssh-copy-id git@<jenkins_server_name>
  3. Verify that the ID is copied successfully by using the following command:

    sudo ssh git@<jenkins_server_name> 
    sudo ssh git@<jenkins_server_name>

    Important

    If your system asks for the password again, follow your OS vendor's documentation to set up login by using ssh keys (passwordless login) or ask your system administrator to set up passwordless login from root@<jenkins_server_name> to git@<jenkins_server_name> and git@<jenkins_server_name> to git@<jenkins_server_name>.

Back to top

Install Ansible and other clients

Perform the following tasks to install the Ansible and other clients.

To set up Ansible

Important

BMC has certified Ansible version 2.9 for this release.

  1. Check whether you have Ansible version 2.9 installed by using the following command.

    ansible --version
  2.  (Optional) If you do not have Ansible installed or you have a version earlier than 2.9 installed, perform the appropriate action:

    1. To install Ansible, run the following command:

      sudo yum install ansible -y
    2. To update to version 2.9, update Epel-Repository with the latest version, and update Ansible again. 
    3. Verify that you have installed Ansible 2.9 by using the following command:

      ansible --version
  3. Update Ansible configurations by using the sudo vi /etc/ansible/ansible.cfg command.
    Search for each of the following parameters by using any editor of your choice or vi editor. 
    Example, If you are using vi editor, search by using / bin_ansible_callbacks.
    Update the /etc/ansible/ansible.cfg file with the values of the parameters mentioned as follows:

    • bin_ansible_callbacks = True
    • callback_whitelist = profile_tasks
    • host_key_checking = False
    • stdout_callback = yaml

  4. Verify that Ansible is up and working as expected by running the following command:

    ansible localhost -m ping

    Back to top

To install additional packages

  1. Install sqlcmd by using the following commands.

    sudo curl https://packages.microsoft.com/config/rhel/7/prod.repo -o /etc/yum.repos.d/msprod.repo
    sudo yum remove -y mssql-tools unixODBC-utf16-devel 
    sudo yum install -y mssql-tools unixODBC-devel
  2. Run the following commands:

    echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bash_profile 
    echo 'export PATH="$PATH:/opt/mssql-tools/bin"' >> ~/.bashrc 
    source ~/.bashrc
  3. Now, reconnect to the new shell by using PuTTY, MobaXterm, or mRemoteNG so that the changes made in Step 2 will be available for all subsequent commands.

  4. Install JRE by using the following command:

    sudo yum install java -y
  5. Make sure that you have 64-bit Java version by using the following command:

     java -version
  6. Install the following packages:

    sudo yum install -y xmlstarlet zip unzip jq dos2unix

    Back to top

To install kubectl

  1. Download the kubectl binary by using the following command:

    curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.18.9/2020-11-02/bin/linux/amd64/kubectl
  2. Apply execute permissions to the binary and copy the binary to a folder in your PATH by using the following command:

    chmod +x ./kubectl
    sudo cp kubectl /usr/bin/kubectl
    mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin
    echo 'export PATH=$PATH:$HOME/bin' >> ~/.bash_profile
    echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc
    source ~/.bashrc
  3. Verify kubectl version by using the following command:

    kubectl version --short --client
  4. If the kubectl version --short --client command does not show the kubectl version, perform any one of the following steps:

    • Run source ~/.bashrc to load ~/.bashrc again OR

    • Open a new shell and run the kubectl version --short --client command to load ~/.bashrc again.

Back to top

To install Helm

  1. Install Helm by running the following command:

    wget https://get.helm.sh/helm-v3.2.3-linux-amd64.tar.gz
    tar -zxvf helm-v3.2.3-linux-amd64.tar.gz
    sudo mv linux-amd64/helm /usr/local/bin/helm
    echo 'export PATH="$PATH:/usr/local/bin/"' >> ~/.bashrc
    
    • Run source ~/.bashrc to load ~/.bashrc again or
    • Open a new shell or connect with new login
  2. Run the following command:

    helm version --short

    The output of this command should show the Helm version as 3.2.3 or later.

Back to top

To configure the kubeconfig file

  1. Add the kubeconfig file in one of the following ways:
    • For a self-hosted cluster, get kubeconfig file from $HOME/.kube/config of master node of cluster. 
      Configure your Kubernetes cluster and get the kubeconfig file or get in touch with your Kubernetes Administrator for the kubeconfig file.
      For more information, see  Configure Access to Multiple Clusters Open link .
    • For a rancher-based cluster:
      1. Log into Rancher.
      2. From the Global view, open the cluster that you want to access with kubectl.
      3. Click Kubeconfig File.
      4. Copy the contents displayed to your clipboard.
  2. Create a directory with the name .kube in home directory of git user if does not already exist.

    mkdir  $HOME/.kube
  3. Download the kubeconfig.yaml file to the $HOME directory.
  4. Copy the kubeconfig.yaml file to $HOME/.kube/config.

    cp <kubeconfig complete file path> $HOME/.kube/config
  5. Check the cluster connectivity by using the following command:

    sudo kubectl get pod -n <namespace>

    Replace <namespace> with the name of your namespace.

    If you receive the following output, the connection to the Kubernetes cluster is successful and the output shows that there are no pods running in the namespace:

    No resources found in <namespace> namespace.

    Back to top

To install OpenShift CLI on Linux

Refer to this section only if you want to use an OpenShift cluster while setting up the pipeline. Use the OpenShift Container Platform command-line interface (CLI) (oc) to develop, build, deploy, and run your applications on an OpenShift cluster. 

Perform the following steps to install the OpenShift CLI (oc) binary on Linux:

  1. Run the following commands and download the OpenShift CLI (oc):

    sudo mkdir /root/openshift_client4_6
    sudo "cd /root/openshift_client4_6/ && wget https://github.com/openshift/okd/releases/download/4.6.0-0.okd-2021-02-14-205305/openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz"
    
    
  2. Unzip the archive.

    sudo "cd /root/openshift_client4_6/ && tar -zvxf openshift-client-linux-4.6.0-0.okd-2021-02-14-205305.tar.gz"
  3. Copy the oc files into a directory that is in your PATH.

    sudo "cd /root/openshift_client4_6/ && cp oc kubectl /usr/local/bin/"
  4. Verify that OpenShift client is installed successfully by using the oc command. 
    The command should run successfully and show the output as OpenShift Client.

    Back to top


To set up BMC Deployment Engine

Depending on your environment, you can choose to install Jenkins by using a docker container or set up Jenkins locally on a node

To install Jenkins locally on a node

Important

Refer to this section to install Jenkins locally on a node.

  1. Run the following commands on the Jenkins node:

    sudo wget -O /etc/yum.repos.d/jenkins.repo https://pkg.jenkins.io/redhat-stable/jenkins.repo
    sudo rpm --import https://pkg.jenkins.io/redhat-stable/jenkins.io.key
    sudo yum upgrade
    sudo yum install epel-release java-11-openjdk-devel
    sudo yum install jenkins-2.314
    sudo systemctl daemon-reload
    sudo systemctl start jenkins

    Important

    If you want to update the plug-ins automatically or by using the web UI, firewall ports should be configured to allow connections to Jenkins repositories. By default, ports 8080 and 8443 are used for this access.

    If your organization's security policies do not allow the opening of firewall ports to internet, use Jenkins offline plug-in installation steps on Jenkins official documentation page.

  2. After Jenkins is installed, access Jenkins by using the following URL:
    http://<jenkins_hostname>:8080
  3. To unlock Jenkins, run the following command on the Jenkins host:

    sudo cat /var/lib/jenkins/secrets/initialAdminPassword
  4. Copy the generated token and paste it on the Jenkins UI as the Administrator password.
  5. On the next page of the Jenkins UI click Install Suggested Plugins before proceeding further.
  6. After the plugins are installed, create the Admin user on the next page.
  7. Follow the instructions on the page and click Save and Finish to complete the Jenkins installation and initial setup.
  8. After the Jenkins setup is complete, configure SSH for Jenkins user and Git user for passwordless authentication by using the following commands: 
    1. Login as a Jenkins user.

      sudo su -s /bin/bash jenkins
    2. Create SSH public keys for the Jenkins user.

      ssh-keygen 
      1. This command prompts for a location to save the key. By default, it is kept in <Home_dir_of_Jenkins>/.ssh/id_rsa.

      2. Press Enter to accept the default values. 

      3. Leave the passphrase blank. 

    3. Copy the SSH public keys to Git user authorized_keys.

      ssh-copy-id git@<git_server_hostname>
    4. Make sure that SSH is configured between the Jenkins user and Git user.

      ssh git@<git_server_hostname>

Back to top

To install the Jenkins container

Important

Refer to this section only if you are installing Jenkins on a docker container. Ensure that you have logged in as a git user.

(optional) To install Docker

Before installing Jenkins container, ensure that you have installed Docker.

Note

BMC recommends that you should not install Podman.

Perform the following steps to install Docker, if Docker is not already installed.

  1. Run the following command: 

    sudo yum install docker -y 
    • If this command is successful, proceed to Step 2.

    • If you are unable to install Docker by using this command, see  Install Docker Engine Open link .
      Note: If you encounter SELinux related issue, run the following command:

      sudo yum install -y http://mirror.centos.org/centos/7/extras/x86_64/Packages/
      container-selinux-2.107-3.el7.noarch.rpm
  2. Start Docker by using the following command and also check if it has started successfully:

    sudo systemctl start docker
    sudo systemctl status docker 

    Back to top

To install Jenkins container

  1. Copy and extract the ITSM_Jenkins_Setup2.314.02.zip file to the Jenkins server location. Verify that the downloaded zip file has MD5 checksum as 15e024c2916a3e6de34caa6c245616bd.

    Extract the zip file by using the following commands: 

    mkdir opt/bmc/Jenkins.serversetup
    sudo "cd /opt/bmc/Jenkins.serversetup && unzip /opt/bmc/Jenkins.serversetup"
  2. After unzipping the file, run following commands from the unzipped directory:

    sudo "cd <path of unzipped file> && chmod -R 755 *"
  3. In the unzipped directory, locate the build.properties file.
    Edit build.properties file and update the following parameters as per your requirements.

    #HOST_SERVER_DATA
    DOCKER_NAME=onprem_itsm_jenkins
    JENKINS_URL=<Jenkins host url>:8080
    (The default port is 8080. You can change the port number, if required)
    HOST_SERVER_LOCATION=/data1/jenkins_home
    (You can specify your host server location to set up Jenkins)
    SSH_HOST_DOCKER_MAPPING=/home/git/.ssh:/home/root/.ssh
    JENKINS_ADMIN_USER=<Jenkins admin user>
    JENKINS_ADMIN_PWD=<Jenkins admin password>
    HOST_2_DOCKER_PORT_MAPPING=8080:8080
    (The default port 8080 is taken from Jenkins URL port. The second port number 8080 is the Jenkins port number inside Docker.
    You can customize the port numbers, if required.)
    # INSIDE_JENKINS_SERVER_DATA (Inside Docker)
    INSIDE_DOCKER_JENKIN_HOME_PATH=/var/jenkins_home

  4. Run the following command:

    sudo <path of unzipped file>/build.sh
  5. Verify that the Jenkins server is up.
    Log in to the Jenkins server from browser by using the <JENKINS_URL> provided in Step 3.
    Keep the browser open and wait for the configuration to be completed. 

  6. After that, click the login link.
    Specify the user name and password that you have provided in build.properties file in Step 3. 

  7. Make sure to reset the default login credentials before proceeding further.

Important

If you want to update the plug-ins automatically or by using the web UI, firewall ports should be configured to allow connections to Jenkins UI. By default, ports 8080 and 8443 are used for this access. Make sure that the ports 8443 and 443 have outbound access and the port 8080 has inbound access.
If you use any custom port that Jenkins is listening, make sure that port has inbound access.
If your organization's security policies do not allow the opening of firewall ports to internet, use Jenkins offline plug-in installation steps on Jenkins official documentation page.

Back to top

To configure the Jenkins server

After you have installed Jenkins either on a local node or in a container, you must configure the Jenkins server.

  1. Log into the Jenkins server.
  2. Install the Parameter Separator plug-in.
    1. On the Jenkins home page, click Manage Jenkins.

    2. Click Manage plug-ins, and select the Available tab.

    3. In the search box, type Parameter Separator.

    4. Select the check box for the Parameter Separator plug-in from the search results.

    5. Click Install without restart.

  3. Install the Validating String Parameter plug-in.
    1. On the Jenkins home page, click Manage Jenkins.

    2. Click Manage plug-ins, and select the Available tab.

    3. In the search box, type Validating String Parameter.

    4. Select the check box for Validating String Parameter plug-in from the search results.

    5. Click Install without restart.

  4. Install the Jira plug-in.
    1. On the Jenkins home page, click Manage Jenkins.

    2. Click Manage Plugins, and select the Available tab.

    3. In the search box, type Jira.

    4. Select the check box for Jira plug-in from the search results.

    5. Click Install without restart.

  5. Install the Rebuilder plug-in.
    1. On the Jenkins home page, click Manage Jenkins.

    2. Click Manage plug-ins, and select the Available tab.

    3. In the search box, type Rebuilder.

    4. Select the check box for Rebuilder plug-in from the search results.

    5. Click Install without restart.

  6. Install the Mask Passwords plug-in.
    1. On the Jenkins home page, click Manage Jenkins.

    2. Click Manage plug-ins, and select the Available tab.

    3. In the search box, type Mask Passwords.

    4. Select the check box for Mask Passwords plug-in from the search results.

    5. Click Install without restart.

  7. Install the BlueOcean Aggregator plug-in.
    1. On the Jenkins home page, click Manage Jenkins.

    2. Click Manage plug-ins, and select the Available tab.

    3. In the search box, type BlueOcean Aggregator.

    4. Select the check box for BlueOcean Aggregator plug-in from the search results.

    5. Click Install without restart.

  8. Add the pipeline-framework library from local Git repository.
    1. On the Jenkins home page, click Manage Jenkins.

    2. Select Configure System.

    3. In Global Pipeline Libraries, add the pipeline-framework library that you created by using the local Git repository.
    4. In the Project Repository field, specify the path that is the complete path of pipeline-framework.git as shown in the following figure:


  9. Add JENKINS-27413-workaround-library that you created by using the local Git repository as shown in the following figure.
    1. Select Load implicitly.
  10. Save the changes.


Back to top

To add credentials

  1. Add credentials in the ID: kubeconfig file.
    1. In a browser, go to http://<Jenkins server host name>:<Jenkins port>/credentials/store/system/domain/_/newCredentials
      For example, http://calbro-eur-upnnld:8080/credentials/store/system/domain/_/newCredentials

    2. Enter the following details:

      KindSecret file
      ScopeGlobal
      FileClick Browse and select the kubeconfig file.

      The kubeconfig file must have a context that refers to the cluster name used for deployment.

      Example:

      If cluster name used for deployment is aus-k8s-cluster, the context must be specified as follows.

      contexts:
      -   context:
               cluster: aus-k8s-cluster
               namespace: ade-poc
               user: aus-k8s-cluster
          name: aus-k8s-cluster
      - context:
             ---

      ID

      kubeconfig
      This name is used as an input to the KUBECONFIG_CREDENTIAL parameter in the HELIX_ONPREM_DEPLOYMENT pipeline.

      DescriptionDescription that you enter.
    3. Click OK.
  2. Add credentials in the ID: github account.
    1. Enter the following details:

      KindUser name with password
      ScopeGlobal
      Usernamegit
      PasswordPassword to access Git. The password is configured in the section where you set up the Git Server.

      ID

      github
      DescriptionDescription that you enter.
    2. Click OK.
  3. Add credential in the ID: ansible_host account.
    Add the user name and password that you use to connect to the virtual machine where you have installed Ansible.
    1. Enter the following details:

      KindUser name with password
      ScopeGlobal
      UsernameUser name to connect to the Ansible machine; for example, git
      PasswordPassword to connect to the Ansible machine.
      IDansible_host
      DescriptionDescription that you enter.
    2. Click OK.
  4. Add credentials in the ID: ansible file.
    Add the username and password that you use to connect the Jenkins server machine to the tools/helm machine.
    1. Enter the following details:

      KindUsername with password
      ScopeGlobal
      UsernameUser name to connect to the Ansible machine; for example, git
      PasswordPassword to connect to Ansible machine.
      IDansible
      DescriptionDescription that you enter.
    2. Click OK.
  5. Add credentials in the ID: TOKENS JSON file.
    1. Create a blank file named tokens.json in your local system.

    2. Enter the following details:

      KindSecret file
      ScopeGlobal
      FileClick Browse and select the tokens.json file.
      IDTOKENS
      DescriptionDescription that you enter.

Back to top

To add Jenkins node

  1. Create the Jenkins node.
    1. Go to <Jenkins server host name>:<Jenkins port>/computer/new
      Example, calbro-eur-upnnld:8080/computer/new.

    2. Select Permanent Agent
      The following figure shows an example where the Permanent Agent has been selected:

    3. Enter the name of the Jenkins server in the Node name field.

    4. Click OK.

    5. Enter the details as shown in the following table, and click Save.

      NameVirtual machine name where you have installed Ansible.
      (Optional) DescriptionDescription of the machine.
      # of executorsNumber of executors required to run parallel jobs.
      Example: 3
      Remote root directory

      Directory on the virtual machine where you have installed Ansible. This directory is used as the root directory for jobs.
      Ensure that you have created the directory and have given all permissions for the user that are provided in ansible_host credentials.
      For example, /data1.

      Note: Make sure that this directory is owned by git user.

      If not, run the following command:

      sudo chown -R git:git /data1
      Labelsansible-master
      Make sure that you enter the label as ansible-master.
      UsageUse this node as much as possible.
      Launch MethodLaunch the agent through SSH.
      • Host: Virtual machine host name on which you have installed Ansible
      • Credentials: Select credentials with the ID ansible_host.
      • Host Key Verification Strategy: Non verifying Verification Strategy.

      The page is as shown in the following figure:


      The ansible-master node is created as shown in the following figure:


  2. Add agent-add-pipeline.
    1. On the Jenkins home page, click New Item.
    2. In Enter an item name field, enter agent-add-pipeline, select Pipeline, and click OK.
    3. Scroll down and select the This project is parameterized check box.
    4. Add a string parameter named UserName and a password parameter named Password as shown in the following figures:



    5. From the Definition list, select Pipeline script.
    6. Copy and paste the script from the agent-add-pipeline.groovy file.

      Important

      Make sure that you do not select the Use Groovy Sandbox option that is shown in the following figure:


    7. Update the value of def Hosts in agent-add-pipeline.groovy script with the Jenkins server hostname as follows:

      def Hosts = [ "<jenkins_server_hostname>" ];

      Ensure that /opt/workspace has permission for non root user (git).

    8. Click Apply and then click Save.
  3. Configure agent-add-pipeline.
    1. From agent-add-pipeline, click Build with Parameters.
    2. Enter the user name of the virtual machine where you have installed Ansible.
      For example, git.
    3. Click Change Password and enter the password of the virtual machine where you have installed Ansible.
    4. Click Build.
      Make sure that the job is completed successfully.
  4. The Jenkins node is created.
    To verify the successful creation of the node, go to http://<Jenkins server host name>:8080/computer, and verify that you see one master node and two agent nodes as shown in the following figure. 
    root-<jenkins node> is the new node added by the agent-add-pipeline.

Back to top


Add deployment pipelines

After setting up the Git repositories, add the deployment (Jenkins) pipelines from the local Git server. 

To add deployment pipelines from local Git server

  1. On the Jenkins home page, click New Item.
  2. In the Enter an item name field, enter a pipeline name as listed in the Deployment pipelines table.
    Example, HELIX_ONPREM_DEPLOYMENT.
  3. Select the pipeline and click OK.
  4. Click the Pipeline tab.
  5. Enter the following information:
    1. From the Definition list, select Pipeline script from SCM.
    2. From the SCM list, select Git.
    3. Enter the Repository URL as the path of your local Git repository in the format ssh://git@<jenkins_server>/<path to itsm-on-premise-installer.git>.
      Example: ssh://git@<jenkinsSrv>/data1/git/GIT_REPO_DIR/ITSM_REPO/itsm-on-premise-installer.git.
    4. Enter the Git server credentials.
    5. Specify the script path.
      Example: pipeline/jenkinsfile/HELIX_ONPREM_DEPLOYMENT.jenkinsfile..
  6. Click Apply & Save.
    After the pipeline is created, make sure that the pipeline is selected from Jenkins home page.
  7. Click Build Now.
    The first build job fails because it needs to run the first time to load all the parameters of the pipeline script. 
  8. After the build job fails, select the pipeline name again from the Jenkins home page.
    The Build Now option changes to Build With Parameters.
  9. Perform step 1 to step 8 for each of the pipelines described in the Deployment pipelines table by modifying the pipeline name, repository, branch and script path.

The following table lists the deployment pipelines for your reference:

Deployment pipelines

Pipeline nameRepository URLBranches to buildScript path
HELIX_ONPREM_DEPLOYMENT

 ssh://git@<jenkins_server>/GIT_REPO_DIR/ITSM_REPO/itsm-on-premise-installer.git  

Refer to Step 5c for the path to ITSM on-premise installer git
*/masterpipeline/jenkinsfile/HELIX_ONPREM_DEPLOYMENT.jenkinsfile
HELIX_GENERATE_CONFIG

 ssh://git@<jenkins_server>/GIT_REPO_DIR/ITSM_REPO/itsm-on-premise-installer.git  

Refer to Step 5c for the path to ITSM on-premise installer git

*/masterpipeline/jenkinsfile/HELIX_GENERATE_CONFIG_ONPREM.jenkinsfile
SUPPORT_ASSISTANT_TOOL 

 ssh://git@<jenkins_server>/GIT_REPO_DIR/ITSM_REPO/itsm-on-premise-installer.git  

Refer to Step 5c for the path to ITSM on-premise installer git

*/masterpipeline/jenkinsfile/assisttool_deploy.jenkinsfile
HELIX_PLATFORM_DEPLOY

 ssh://git@<jenkins_server>/GIT_REPO_DIR/ITSM_REPO/itsm-on-premise-installer.git  

Refer to Step 5c for the path to ITSM on-premise installer git

*/masterpipeline/jenkinsfile/HELIX_PLATFORM_DEPLOY_ONPREM.jenkinsfile
HELIX_NON_PLATFORM_DEPLOY

 ssh://git@<jenkins_server>/GIT_REPO_DIR/ITSM_REPO/itsm-on-premise-installer.git  

Refer to Step 5c for the path to ITSM on-premise installer git

*/masterpipeline/jenkinsfile/HELIX_NON_PLATFORM_DEPLOY_ONPREM.jenkinsfile
HELIX_SMARTAPPS_DEPLOY

 ssh://git@<jenkins_server>/GIT_REPO_DIR/ITSM_REPO/itsm-on-premise-installer.git  

Refer to Step 5c for the path to ITSM on-premise installer git

*/masterpipeline/jenkinsfile/HELIX_SMARTAPPS_DEPLOY_ONPREM.jenkinsfile

HELIX_FLUENTBIT_DEPLOY

 ssh://git@<jenkins_server>/GIT_REPO_DIR/ITSM_REPO/itsm-on-premise-installer.git  

Refer to Step 5c for the path to ITSM on-premise installer git

*/masterpipeline/jenkinsfile/HELIX_FLUENTBIT_DEPLOY.jenkinsfile

Back to top

Troubleshooting

Refer to the troubleshooting information if you encounter any of the following issues while setting up BMC Deployment Engine.

Issue symptom

You get the following error while adding deployment pipelines from local Git server:

Failed to connect to repository : Command "git ls-remote -h -- ssh://git@<jenkins_server>/var/git/ITSM_REPO/itsm-on-premise-installer.git HEAD" returned status code 128:
stdout:
stderr: Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

Resolution

Verify that you have performed all the steps in To set up the Git client.


Issue symptom

You get one of the following errors while adding libraries to Jenkins server from local Git server:

Error 1

Pipeline HELIX_ONPREM_DEPLOY failed:
hudson.plugins.git.GitException: Command "git ls-remote -h -- ssh://git@<jenkins_server>/var/git/LIB_REPO/LIBRARY_REPO/pipeline-framework/pipeline-framework.git" returned status code 128:
stdout:
stderr: fatal: '/var/git/LIB_REPO/LIBRARY_REPO/pipeline-framework/pipeline-framework.git' does not appear to be a git repository
fatal: Could not read from remote repository.

Error 2

hudson.plugins.git.GitException: Command "git fetch --tags --progress --prune -- origin +refs/heads/master:refs/remotes/origin/master" returned status code 128:
stdout: 
stderr: fatal: Could not read from remote repository.

Resolution

  1. Run the following commands:

    chown -R git:git <LIBRARY REPO>
    chmod -R 777 <LIBRARY_REPO>
  2. Verify that you have performed all the steps in To set up the Git client.

For other issues, see Troubleshooting deployment pipeline failure issues.

Where to go from here

Setting up the installation environment



Was this page helpful? Yes No Submitting... Thank you

Comments

  1. Eric Wuensche

    Just based on theory: Is this section missing the installation of the openshift command line tool "oc" in case one wants to deploy to openshift cluster?

    Jul 13, 2021 08:58
    1. Kanchana Iyer

      Hello Eric,

      Thanks for your question.

      We have added the instructions to install OpenShift CLI (oc) in this topic.

      Regards,

      Kanchana


      Jul 14, 2021 10:39
  2. Jiunn Lam

    Few comments on the installation guide on this page:

    • First, it would be nice to break this page into few subpages. It would feel less long to follow the entire installation process.

    • Step: To set up Ansible - 9. Configure Kubeconfig file

      • "Download the kubeconfig.yaml file to the /root folder in the virtual machine where you have installed Ansible" ==> it would be nice to indicate where we should download the kubeconfig file from, it may not be obvious for every Customer.
    • Step: To install OpenShift CLI on Linux - 5.

      • "Execute oc command, It should give output as shown below." and "OpenShift Client" should be outside the copy black box.
      • "Use the OpenShift Container Platform command-line interface (CLI) (oc) to develop, build, deploy, and run your applications on an OpenShift or Kubernetes cluster. " ==> is OpenShift CLI necessary if we do Kubernetes platform? The phrase sounds like it is.
    Jul 16, 2021 08:33
  3. Jagadish Patil

    Below command does not work as OS recommned for Jenkins is 7.X, sudo curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/msprod.repo

    We tried below and it worked for us, $sudo curl https://packages.microsoft.com/config/rhel/7/prod.repo -O /etc/yum.repos.d/msprod.repo

    Jul 19, 2021 08:15
    1. Poonam Morti

      Hi Jagadish,

      We have updated the command.

      Thanks, Poonam

      Sep 23, 2021 11:57
  4. Mark Walters

    in "Install sqlcmd by using the following commands." there are multiple commands on one line which should be separated - they won't run as they are

    Jul 22, 2021 04:15
  5. Mark Walters

    Can we get some consistency on the example command lines please? Some show a prompt such as $, sometime with a space after and sometimes not. Others omit the prompt character - it's confusing and leading to questions on what the correct format should be.

    Jul 22, 2021 07:52
    1. Kanchana Iyer

      Thanks for your comment. We have updated the docs.

      Sep 27, 2021 12:47
  6. Gregory Kiyoi

    should this be renamed to something more externally friendly vs. "workaround" in the name? JENKINS-27413-workaround-library

    Jul 27, 2021 07:39
  7. Susan Chan

    To Add Jenkins Node Number of executors required to run parallel jobs. Example: 6

    Screenshot shows '3 ' which is inconsistent.

    Jul 29, 2021 11:31
  8. Susan Chan

    The below command is wrong...

    Copy and extract the Jenkins_setup.zip file to the Jenkins server location. For example unzip/opt/bmc/<Jenkins.serversetup>.

    Should read -

    unzip /opt/bmc/<Jenkins.serversetup>/Jenkins_setup.zip.

    Jul 29, 2021 11:39
    1. Poonam Morti

      Hi Susan,

      We have updated the topic.

      Thanks,

      Poonam

      Sep 24, 2021 04:55
  9. Eric Wuensche

    The jenkins files are incorrect in the deployment pipelines table for the following pipelines: HELIX_FLUENTBIT_DEPLOY HELIX_ELASTICSEARCH_DEPLOY HELIX_PLATFORM_DEPLOY

    Aug 09, 2021 06:12
    1. Kanchana Iyer

      Hello Eric,

      Thanks for your comment. We have updated the content.

      Sep 27, 2021 01:19
  10. Ariel Manka

    To set up Ansible section contains incorrect procedure to install 'ansible'. Instruction should be something like: sudo dnf install --enablerepo epel-playground ansible

    Sep 23, 2021 02:34
    1. Poonam Morti

      Hi Ariel,

      The command that you have share seems to be for CentOS 8.

      In the To set up Ansible section, we have specified the command for CentOS 7 as we are supporting CentOS 7 operating system.

      Thanks,

      Poonam



      Sep 24, 2021 04:37
      1. Ariel Manka

        Hi Poonam,

        That's correct. Any plans on extending list of supported operating systems with newer releases, mainly compatible with RHEL 8? CentOS 7 is out of full support and has been on maintenance support only since August 2020. I doubt that many customers would opt for this release for new deployment.

        Sep 24, 2021 09:21
  11. Ariel Manka

    Question about docker installation. Instructions provided here result in podman-docker being installed. It was observed that podman creates conflicts with deployment of Harbor which comes with in-built docker from the original docker repository. Wouldn't it be better to align the setup process to make use of the official docker installation process https://docs.docker.com/engine/install/ ?

    Sep 24, 2021 09:26
    1. Kanchana Iyer

      Hello Ariel, thanks for your query. We recommend you to raise a ticket with Support to analyze your environment. As of now, in the current steps, we are not certifying Podman.

      Dec 14, 2021 03:29
  12. Ariel Manka

    Step "To set up the Git server" is missing "git init" and "git add". Without that Jenkins will not be able to access repository.

    Sep 24, 2021 11:50
    1. Eric Wuensche

      Hi Ariel, through SSH it will work just fine without initialization, but if you want to do further operations on the repository it might be required - I was confused as well before.

      Sep 28, 2021 06:49
      1. Ariel Manka

        Hi Eric,

        It didn't work in my case. adding a new pipeline was failing. Logs showed that error happened with command git ls-remote -h ssh://git@//ITSM_REPO/itsm-on-premise-installer.git When I googled that error answers pointed to missing .git directory which gets created with git init. Once corrected I was able to save the pipeline.

        Sep 29, 2021 09:54
    1. Kanchana Iyer

      Hello Ariel,

      Thanks for your comments. 'git init' and 'git add' have been added to the Jenkins pipelines.

      Regards,

      Kanchana

      Oct 25, 2021 01:27
  13. Eric Wuensche

    For the jenkins Docker build additional firewall clearance is necessary for the plugin installation and should be mentioned on top where domains for the container repository are listed. Additionally the section for several plugin installations can be removed, as the plugins are already installed during the docker build phase.

    Sep 28, 2021 06:51
    1. Kanchana Iyer

      Hello Eric, Thanks for your suggestions. We have updated our documentation.

      Dec 14, 2021 03:42
  14. Marek Ceizel

    I cannot find the jenkins plugins from configure jenkins server section. jenking doesn't find them at all . are you sure about the names ?

    Sep 28, 2021 06:58
    1. Eric Wuensche

      Hi Marek, if you used the docker build script, the plugins should be installed during this process. When opening the plugin manager page, check the "installed" tab and filter for the mentioned names.

      Sep 28, 2021 07:10
      1. Marek Ceizel

        Bless you Eric :) I'm blind. thanks a lot

        Sep 28, 2021 08:18
  15. Paul Seager-Smith

    As of 1st October, the Jenkins container install fails with an expired certificate error whilst installing the plugins. It looks like the server where at least one of the plugins is located has an expired certificate. Hopefully someone in the Jenkins team will notice this and renew the certificate. In the meantime I had to dig into the container and tweak the curl settings.

    Oct 01, 2021 05:04
    1. Eric Wuensche

      Why can't BMC directly deliver the pre-built jenkins image through containers.bmc.com?

      Oct 01, 2021 05:55
    1. Mark Walters

      Quick fix - before building the image edit the Docker and add this line after the ENV JAVA_OPTS line

      ENV CURL_OPTIONS=-k

      Save the file and use the build.sh script as detailed.

      Oct 02, 2021 07:35
      1. Marek Ceizel

        Thanks a lot Mark! Great Idea. Actually I used: ENV CURL_OPTIONS=-sSfLk

        the -sSfL is the original and k should be added. With only -k I got a bunch of other errors

        Oct 02, 2021 08:19
      1. Mark Walters

        Update - use

        ENV CURL_OPTIONS=-ksSfL

        Oct 04, 2021 05:01
    1. Ali Al-Jawad

      I faced the same problem. I had to use another docker image for jenkins from the Internal User Testing days back in July. So this seems to be a problem as well.

      Oct 03, 2021 05:39
    1. Kanchana Iyer

      Thanks Paul. Docs will be updated shortly for the fix.

      Oct 25, 2021 01:33
    1. Kanchana Iyer

      Hello Paul, Thanks for your observation. We have updated our documentation and updated code to fix this issue in the latest release.

      Dec 14, 2021 03:39
  16. Markus Wolf

    In the section on agent-add-pipeline it should futhermore be noted, that the script expects the installation to occur in /opt/workspace/. If your server does not have this directory hierarchy it will not work. You can either fix this in the Jenkins script in the following line: Slave agent = new DumbSlave( "${UserName}-${HostName}", "/opt/workspace/${UserName}/", launcher) Or in the agent configuration after the agent has been created.

    Oct 14, 2021 05:01
    1. Kanchana Iyer

      Hello Markus Wolf.

      Thanks for your query. The topic has been updated with the fix. 

      Thanks and regards,

      Kanchana

      Oct 25, 2021 01:34
  17. Balaji Kumbhar

    If I use yum install ansible command, then this command is installing ansible 2.9 version. In this doc you mention Ansible 2.8 is certified.

    Please can you confirm will this new version supported 2.9?

    If not then how to install Ansible 2.8?

    Dec 03, 2021 04:08
    1. Kanchana Iyer

      Hello Balaji Kumbhar, thanks for your query. The topic has been updated for Ansible.

      Regards,

      Kanchana

      Dec 28, 2021 02:11
  18. Emrah Ozbekar

    Can anybody explain how to do "To configure the kubeconfig file" please?

    https://docs.bmc.com/docs//brid2105/setting-up-bmc-deployment-engine-1012762678.html#SettingupBMCDeploymentEngine-configureKubeConfigToconfigurethekubeconfigfile

    • Where is the kubeconfig.yaml file? How can I download it?
    • Should I run those commands (to create a directory, copy file and kubectl commands) with the user root or git?
    Dec 06, 2021 02:24
    1. Kanchana Iyer
      • Where is the kubeconfig.yaml file? How can I download it? Please contact your cluster administrator for this.
      • Should I run those commands (to create a directory, copy file and kubectl commands) with the user root or git? -Unless specified, please run the setup with non root user (git).
      Dec 14, 2021 03:13
  19. Andreas Mitterdorfer

    [quote]..If your system asks for the password again in Step 4, follow your OS ..[quote] Should be Step 3

    Dec 22, 2021 08:55
    1. Kanchana Iyer

      Hello Andreas Mitterdorfer, thanks for your query. The topic has been updated.

      Regards,

      Kanchana

      Dec 28, 2021 02:11
  20. Ronald Bã¶ttcher

    The MD5 Checksum for https://docs.bmc.com/docs/brid2105/files/1012762678/1053751314/1/1640676085377/ITSM_Jenkins_Setup2.314.02.zip is unfortunately not the same wich I calculate. Your sum: dffb144234447b131ce0c0db438992b0 My sum: 15e024c2916a3e6de34caa6c245616bd

    (btw for the ZIP referenced in the PDF the MD5 checksums match, but this is an older one)

    Jan 05, 2022 02:51
    1. Kanchana Iyer

      Hello Ronald,

      Thanks for your question. The topic has been updated now.

      Regards,

      Kanchana


      Jan 24, 2022 11:14