Versions Compared

Key

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

...

  • Virtual Machine (VM): A VM with root access.
  • Git: Installed on your VM.
  • Docker (Optional): Install using the following commands:
    Code Block
    curl -fsSL https://get.docker.com -o get-docker.sh
    sh get-docker.sh
    • Create a new user group named "docker" and add the Jenkins user to this group:
      Code Block
      sudo groupadd docker
      sudo usermod -aG docker $USER
    • Log out and log back in to re-evaluate group membership. On a virtual machine, you may need to restart it. On Linux, you can also run:
      Code Block
      newgrp docker
    • Verify Docker commands can be run without sudo:
      Code Block
      docker run hello-world
    • Ensure access to pull Docker base images like Tomcat and MySQL from Docker Hub. If access is not available, ensure these images are available locally on the Jenkins VM.

Jenkins Server Setup

  1. Clone the repository and navigate to the jenkinsServerSetup directory:

    Code Block
    git clone <repository_url>
    cd jenkinsServerSetup


  2. Execute the installation script as sudo:

    Code Block
    sudo sh install_jenkins_server.sh

    This script installs Docker, pulls the Jenkins server image from Docker Hub, and installs necessary dependencies like Maven and Jenkins plugins. It also creates Automatics Core & RDKB Utils build jobs and build and deployment jobs.

  3. During script execution, provide inputs such as the port for the Jenkins server. After setup, access Jenkins via the browser using the public IP and port (e.g., 192.168.91.44:8909).

  4. Configure Jenkins security:

    • Go to "Manage Jenkins" → "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".
  5. Modify the necessary configurations in the pre-created Jenkins jobs (e.g., Maven repo URL, shell script file paths).

...

The below mandatory system configurations needs to be done in Automatics orchestration for running a first dummy Test execution and result verification from automatics. All the URLs and DB credentials used for the deployment can be found as a YAML file in "archived artifacts" of Automatics Deployment Job execution DeploymentJob

System Config ParamDescription

DEFAULT_SYNDICATION_PARTNER

Default syndication partner. Eg: Company name

SYNDICATION_PARTNERS

Syndication partner names in comma separated format.  Eg: Company name1, Company name2

DEVICE_INVENTORY_BASE_URL

Base URL which is having the rest implementation of device management

EXECUTION_ENVIRONMENT_TYPES

Execution environment types in comma separated format. Supported values are RDKV, RDKB

AUTOMATICS_BASE_URLBase URL of Automatics Orchestration Application
MICROSERVICE_URLBase URL of Scriptless Service
JUNJenkins Admin User Name
JUPJenkins Admin User Password

...

All the mandatory properties mentioned in the document Automatics Properties should be configured in automatics properties for the successful execution of a test case.

Important Points to Note

New Features in Release 33

  • Docker Compose Integration: Automated deployment scripts now use Docker Compose.
  • Environment Files: All Docker container data (like VM IP, port credentials, etc.) is stored in an environment file for each Automatics application stack. A stack includes both the backend server Docker container and the database Docker container.

Simplified Container Management

  • Easier Start/Stop: Starting and stopping Automatics Docker containers is now more user-friendly and efficient.
  • Automatic Port Assignment: You no longer need to manually identify and provide free ports in the VM. The script will automatically assign a free port to each Docker container. You can see the assigned ports in the YAML file generated under "archived artifacts" after completing the deployment job. If you input a specific port, the script will use that port for deploying the corresponding application.
  • Automated Directory Creation: You no longer need to create directories in the VM and provide them as input to the Automatics deployment job. The automated scripts will use Docker volumes to create and attach volumes for each application stack, ensuring logs and database data persist even after deleting or removing Docker containers.

Upgrading from Older Versions

For users upgrading from older versions of Automatics using the latest scripts, please note the following one-time activities:

  1. Stop and Remove Old Containers: Manually stop and remove old Automatics Docker containers.
  2. New Containers: After running the deployment job, all containers will be new, so no existing data will be present.
  3. Backup and Restore Data:
    • Backup and restore database data to the new DB Docker containers.
    • Backup and restore automatics.properties and device_config.json files to the newly deployed application.
  4. Log Files: Old Automatics Docker container log files will remain in the existing VM directory. For accessing the logs you can go inside the docker container and open the logs folder, all the server logs will be available in that location. 


Upgrading Automatics Applications Post-Release

To upgrade Automatics applications after a release using the latest automated deployment scripts:

  1. Identify Changes: Determine which Automatics application stacks have new changes.
  2. Build Job:
    • Open the Automatics Build job in Jenkins.
    • Tick the Build button for the application stacks with changes and run the build job.
  3. Deployment Job:
    • Open the Deployment Job.
    • Input all parameters, including the existing VM IP address and port where the application stack is running.
    • Run the deployment job to deploy the latest changes to the corresponding application.