Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagepowershell
themeEclipse
firstline1
titleCommands to Install Docker
linenumberstrue
curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh
    1. Maven - version 3
    2. JDK - 1.817
  1. Create a new user group in the VM named "docker" and add the Jenkins user to this user groups the below commands can be referred for the same
    1. Create the docker group.

      $ sudo groupadd docker
      
    2. Add your user to the docker group.

      $ sudo usermod -aG docker $USER
      
    3. Log out and log back in so that your group membership is re-evaluated.

      If testing on a virtual machine, it may be necessary to restart the virtual machine for changes to take effect.

      On a desktop Linux environment such as X Windows, log out of your session completely and then log back in.

      On Linux, you can also run the following command to activate the changes to groups:

      $ newgrp docker 
      
    4. Verify that you can run docker commands without sudo.

      $ docker run hello-world
      

      This command downloads a test image and runs it in a container. When the container runs, it prints a message and exits.

  2. Access to pull the docker base image like tomcat, mysql from dockerhub should be available. If access cannot be provided then those images should be available locally in the Jenkins VM for building docker images of Automatics tools.

...

  1. Clone the above repo and go to the directory "jenkinsServerSetup\"
  2. Here you will find a file named "install_jenkins_server.sh" 
  3. Execute this shell script as sudo. This will install Docker and pull the Jenkins server image from docker hub 
  4. Then it will install all the necessary dependencies link maven, and Jenkins plugins.
  5. Also Automatics Core & RDKB Utils build jobs as well as Build and Deployments jobs will be created.
  6. When executing the shell script it will ask for the inputs like the port in which the Jenkins server needs to be started. Please input those details during execution
  7. Once the jenkins server setup is completed. Open the browser and give the public ip and port(or domain name if you have one) in URL box which will open the jenkins webpage. For example if your public ip address is 192.168.91.44 and jenkins server is started on 8909 the give the URL as "192.168.91.44:8909", you will get the page like below 
  8. Now open "Manage Jenkins" option→ "Configure Global Security" → Under Security Realm, select Jenkins’ own user database → In the Authorization section, select Logged-in users can do anything. → Unselect Allow anonymous read access. → Click Save to save your changes.
    1.  
  9. Now go inside the already created jobs in Jenkins and modify the necessary configurations like maven repo URL, Shell script file paths etc

...