DESK On Docker Project: Difference between revisions

From DDCIDeos
Jump to navigationJump to search
Mcarroll (talk | contribs)
Line 110: Line 110:
   sudo mkdir /mnt/nx3000/ship
   sudo mkdir /mnt/nx3000/ship
   sudo mount -t cifs -o domain=ddci.com,username=<ddci_username> //nx3000/ship /mnt/nx3000/ship
   sudo mount -t cifs -o domain=ddci.com,username=<ddci_username> //nx3000/ship /mnt/nx3000/ship
   cp /mnt/nx3000/ship/dds/ubuntu/<DDS-Release-Archive> ~/DDS/<DDS-Release-Archive>  
   rsync -arv /mnt/nx3000/ship/dds/ubuntu/<DDS-Release-Archive> ~/DDS/<DDS-Release-Archive>  


NOTES:  
NOTES:  
*"~/DDS/<DDS-Release-Archive>" is only a recommended path. User can pick whatever path they like.
*"~/DDS/<DDS-Release-Archive>" is only a recommended path. User can pick whatever path they like.
* <ddci_username> is the ddci username without the "@ddci.com" (e.g. mcarroll)  
* <ddci_username> is the ddci username without the "@ddci.com" (e.g. mcarroll)


== Managing Packages ==
== Managing Packages ==

Revision as of 15:30, 15 July 2025

A Deos project to get the DESK working within a Docker Container. See also the DESK_On_Linux_Project.

How to use

Docker images can be constructed and executed on Windows using WSL or in a Linux environment. Currently tested on Ubuntu, but others should work just as well.

Quick Guide

If you are interested in setting up a Windows test machine with wsl and docker for running the OA test harness, and using an eclipse OA development environment, follow these steps:

  1. Begin by following Option 1 below, within 'Get a Docker Capable Workstation'. Follow the steps in the WSL readme until you reach the choice between Option #1 and Option #2.
  2. Take option #1 by returning to this page and following the steps from 'Install Docker' through to and including 'Build a Docker Image.'
  3. Now, move to OpenArbor_Development_Docker. Follow the steps from Create a WSL shortcut to Download and install Eclipse. Complete only the steps under 'DDS docker image' in the latter.
  4. The setup for your wsl environment, docker image 'oa-test-harness-kismet-dev', and docker image '<dds-name>-dev' for the dds you chose to build an image for are now complete. Use the 'oa-test-harness-kismet-dev' image to perform any test harness tasks. Use any dds docker images

created following the previous steps to perform development tasks.

Get a Docker Capable Workstation

Choose any one of the following options:

  1. On a windows workstation, install docker within a Windows Subsystem for Linux (WSL). See the WSL Readme.
    • WSL requires Windows 11 or Win10_22H2, both require specific patch levels.
    • The most recent versions of WSL require that the Windows Features "Windows Subsystem for Linux" and "Virtual Machine Platform" are enabled. Please see WSL2 notes
  2. Using a VMWare DDCI virtual machine on the ESX server. See VMWare_Server_Ubuntu.
  3. Using a DDCI generated Linux virtual machine on your workstation
  4. Install Linux on your workstation.

Install Docker

NOTE: If you are using a DDCI pre-built Virtual Machine or WSL this step will have already been performed.

 sudo apt-get update
 sudo apt-get install docker-buildx docker.io
 sudo usermod -aG docker ${USER}
 newgrp docker

If you have problems, the Docker website has a more involved set of steps.

Update your .bashrc

Add the following to your .bashrc in your Linux (WSLg) home directory:

export DDCIFLEX_LICENSE_FILE=the location of your license file
PATH="$PATH":~/scm/Deos/maintainer-tools/docker/branches/mainline
# Update prompt to include "dkr" when inside a container.
if [[ $- == *i* ]]; then #interactive
    PS1='\W\$ '
    if [[ -f /.dockerenv ]]; then
        dkr=$(</.dockerenv)  # /.dockerenv may be empty or contain the categorization of the environment, e.g., dkr or wsl.
        PS1="${dkr:-dkr} $PS1"
    fi
fi

Login to the Docker Server

In order to build docker images you must login to the DDCI docker server. The login is persistent across local machine reboots so this should only need to be done once.

  docker login redhat5.ddci.com -u ${USER}@ddci.com
  Password: <Your password>     Password is the DDCI web and svn password

Build A Docker Image

Install subversion if needed: sudo apt install subversion

From within your Linux environment, e.g., within WSLg:

 mkdir -p ~/scm
 svn co --username=$USER@ddci.com -N https://deos.ddci.com/scm/Deos ~/scm/Deos
 svn up --parents ~/scm/Deos/maintainer-tools/docker/branches/mainline
 cd ~/scm/Deos/maintainer-tools/docker/branches/mainline

Follow the instructions in the https://ddci.zapto.org/scm/Deos/maintainer-tools/docker/branches/mainline/README.txt to build a docker image.

Execute a Docker Image

From a console in your Linux environment:

  run-docker -it --rm ubuntu-jupiter-dev

At this point you should be able to interact with the docker image as you would a Cygwin shell. For example to start OpenArbor:

  /OpenArbor/OpenArbor &

If you would like to redirect the OpenArbor's output so that it doesn't pollute your terminal, you can run the following command:

  /OpenArbor/OpenArbor &> /tmp/output.log &

The &> redirects both stdout and stderr to a file called output.log which is located in the tmp directory (keep in mind the tmp directory is not persistent between boots)

Mounting NX3000

To be able to access the DDS releases it is easiest to mount the location where the DDS archived releases are located. Below are the steps to mount the nx3000 NFS. These commands are run in WSL.

  sudo apt-get install cifs-utilities
  sudo mkdir /mnt/nx3000
  sudo mkdir /mnt/nx3000/ship
  sudo mount -t cifs -o domain=ddci.com,username=<ddci_username> //nx3000/ship /mnt/nx3000/ship
  rsync -arv /mnt/nx3000/ship/dds/ubuntu/<DDS-Release-Archive> ~/DDS/<DDS-Release-Archive> 

NOTES:

  • "~/DDS/<DDS-Release-Archive>" is only a recommended path. User can pick whatever path they like.
  • <ddci_username> is the ddci username without the "@ddci.com" (e.g. mcarroll)

Managing Packages

Inside a docker container the https://ddci.zapto.org://scm/Deos/maintainer-tools/docker/branches/mainline/unrelease script can be used to switch between unreleased and stable component versions. The script has sophisticated support for the tab key, e.g., to auto-complete the package names.

It is possible to install, remove, and update package versions. See DDCI_Linux_Hints#Updating_and_installing_packages_in_Ubuntu.

However it is often easier to just generate a new Docker image.