Release Management
CSLE has semantic versioning, i.e., versions of CSLE are of the form MAJOR.MINOR.PATCH.
- The
MAJORversion is incremented when incompatible API changes are made. - The
MINORversion is incremented new functionality is added in a backwards compatible manner. - The
PATCHversion is incremented when backwards compatible bug fixes are made.
To generate a new release of CSLE, the following steps must be performed:
- Publish new versions of the Python libraries to: https://pypi.org/.
- Publish new versions of the Docker containers to: https://hub.docker.com/.
- Publish a new version of the documentation to: http://kim-hammar.github.io/csle/.
- Make a GitHub release with all artifacts (https://github.com/Kim-Hammar/csle).
Python releases. To make a new Python release, do the following:
- Copy the
csle/simulation_system/libs/.pypirc_templatefile to your home directory and rename it to.pypirc, e.g.,/home/kim/.pypirc. - Create a PyPi token following the intructions here.
- Add the PyPi token to the
.pypircfile. - Edit the
RELEASE_CONFIGvariable to match the versions of the release in the file:./simulation-system/libs/make_release.pyListing 143: File to generate Python releases.
- Run the command below to build all the Python libraries and push the built artifacts to PyPi:
python ./simulation-system/libs/make_release.pyListing 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:
- Edit the
VERSIONvariable in the file:./emulation-system/base_images/MakefileListing 146: Makefile for base Docker images in CSLE.
- Edit the
VERSIONvariable in the file:./emulation-system/derived_images/MakefileListing 147: Makefile for derived Docker images in CSLE.
- 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.
- 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.
- Edit the version parameters in all emulation configurations in the following directory:
./emulation-system/envsListing 150: Directory with emulation configurations.
- Make a new release of
https://github.com/Kim-Hammar/exploit-CVE-2017-7494:- Clone the repo by runnign the command:
git clone https://github.com/Kim-Hammar/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
- Clone the repo by runnign the command:
- Build the images by running the command:
cd emulation-system/; make buildListing 151: Command to build the Docker images in CSLE.
- Push the images to DockerHub by running the command:
cd emulation-system/; make pushListing 152: Command to push Docker images to DockerHub.
- Insert the new emulation configuration into the metastore by running the command:
cd emulation-system/; make emulationsListing 153: Command to insert emulation configurations into the metastore.
GitHub releases. To make a release in GitHub, follow the official guide.