Release Management

CSLE has semantic versioning, i.e., versions of CSLE are of the form MAJOR.MINOR.PATCH.

  • The MAJOR version is incremented when incompatible API changes are made.
  • The MINOR version is incremented new functionality is added in a backwards compatible manner.
  • The PATCH version is incremented when backwards compatible bug fixes are made.

To generate a new release of CSLE, the following steps must be performed:

  1. Publish new versions of the Python libraries to: https://pypi.org/.
  2. Publish new versions of the Docker containers to: https://hub.docker.com/.
  3. Publish a new version of the documentation to: http://limmen.dev/csle.
  4. Make a GitHub release with all artifacts (https://github.com/Limmen/csle).

Python releases. To make a new Python release, do the following:

  1. Copy the csle/simulation_system/libs/.pypirc_template file to your home directory and rename it to .pypirc, e.g., /home/kim/.pypirc.
  2. Create a PyPi token following the intructions here.
  3. Add the PyPi token to the .pypirc file.
  4. Edit the RELEASE_CONFIG variable to match the versions of the release in the file:
      ./simulation-system/libs/make_release.py
    

    Listing 143: File to generate Python releases.

  5. Run the command below to build all the Python libraries and push the built artifacts to PyPi:
      python ./simulation-system/libs/make_release.py
    

    Listing 144: Command to generate a new Python release.

Documentation releases. After making a new Python release, the new API documentation can be generated by running the command:

simulation-system/libs/generate_docs.sh

Listing 145: Command to generate release documentation.

Docker releases. To make a new Docker release, do the following:

  1. Edit the VERSION variable in the file:
     ./emulation-system/base_images/Makefile
    

    Listing 146: Makefile for base Docker images in CSLE.

  2. Edit the VERSION variable in the file:
       ./emulation-system/derived_images/Makefile
    

    Listing 147: Makefile for derived Docker images in CSLE.

  3. Edit the versions of the derived images in the Dockerfiles inside the following directory:
      ./emulation-system/derived_images/
    

    Listing 148: Directory with derived Docker images in CSLE.

  4. Edit the versions of the base images in the Dockerfiles inside the following directory:
      ./emulation-system/base_images/
    

    Listing 149: Directory with base Docker images in CSLE.

  5. Edit the version parameters in all emulation configurations in the following directory:
    ./emulation-system/envs
    

    Listing 150: Directory with emulation configurations.

  6. Make a new release of https://github.com/Limmen/exploit-CVE-2017-7494:
    • Clone the repo by runnign the command: git clone https://github.com/Limmen/exploit-CVE-2017-7494
    • Update the version parameter in exploit-CVE-2017-7494/Makefile
    • Build: cd exploit-CVE-2017-7494; make build
    • Push: cd exploit-CVE-2017-7494; make push
  7. Build the images by running the command:
       cd emulation-system/; make build
    

    Listing 151: Command to build the Docker images in CSLE.

  8. Push the images to DockerHub by running the command:
      cd emulation-system/; make push
    

    Listing 152: Command to push Docker images to DockerHub.

  9. Insert the new emulation configuration into the metastore by running the command:
      cd emulation-system/; make emulations
    

    Listing 153: Command to insert emulation configurations into the metastore.

GitHub releases. To make a release in GitHub, follow the official guide.