Giter VIP home page Giter VIP logo

diracos2's Introduction

DIRACOS2

Experimental repository using conda constructor to build a Python 3 DIRACOS installer.

Table of contents

Installing DIRACOS2

These instructions will install the latest release of DIRACOS in a folder named diracos. To install a specific version replace /latest/download/ in the URL with a version like /download/2.0a4/.

curl -LO https://github.com/DIRACGrid/DIRACOS2/releases/latest/download/DIRACOS-Linux-x86_64.sh
bash DIRACOS-Linux-x86_64.sh -b -p "$PWD/diracos/"

It can then be activated in a similar way to version 1 of DIRACOS, by calling source "$PWD/diracos/diracosrc".

NOTE: At this time there are no stable releases of DIRACOS2 and therefore the /latest/ alias is non-functional. See the GitHub releases page for the list of available pre-releases.

Extensions

TODO: See DIRACGrid#1

Advanced documentation

Building the installer

The DIRACOS installer is a self-extracting shell script that is generated using conda constructor. This can be installed using any conda installation. If you don't have a local conda installation, you can use the following steps on Linux:

wget https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh
bash Miniforge3-Linux-x86_64.sh -b -p $PWD/miniforge
# This line is needed every time you wish to use miniforge in a new shell
eval "$($PWD/miniforge/bin/conda shell.bash hook)"
conda install constructor

Once you have constructor installed, a new installer can be generating from the construct.yaml using:

constructor . --platform=linux-64

The packages included are defined in the construct.yaml file, see the upstream documentation for more details.

Testing the installer

Basic tests of the installer can be ran using an arbitrary docker image by running:

scripts/run_basic_tests.sh DOCKER_IMAGE DIRACOS_INSTALLER_FILENAME

Making a release

To ensure reproducibility, releases are made from build artifacts from previous pipelines and are tagged using GitHub actions by triggering the Create release workflow. This workflow runs scripts/make_release.py and has the following optional parameters:

  • Run ID: The GitHub Actions workflow run ID. If not given, defaults to the most recent build of the main branch.
  • Version number: A PEP-440 compliant version number. If not given, defaults to the contents the contents of version field in the construct.yaml rounded to the next full release (i.e. 2.4a5 becomes 2.4 and 2.1 remains unchanged). If a pre-release is explicitly give, it will be marked as a pre-release in GitHub and won't affect the latest alias.

If the release process fails, a draft release might be left in GitHub. After the issue has been fixed this can be safely deleted before rerunning the CI.

After the release is made a commit will be pushed to master to bump the DIRACOS release number in construct.yaml to the next alpha release. If the next alpha release is older than the current contents of construct.yaml, this step is skipped.

Building customised packages

See management/conda-recipes.

Miscellaneous remarks

DIRACOS2 is a smaller wrapper around conda constructor which generates a self-extracting installer that is suitable for DIRAC's needs based on packages which are distributed by conda-forge. As such, most components are documented by their respective projects. The following is a list of remarks that are specific DIRACOS2:

  • The build-and-test workflow is ran on every push event as well as once per day. GitHub Actions limitations will cause the nightly build to be disabled if there is no activity in the repository for 60 days. If this happens, it can be easily re-enabled by pushing an empty commit to master.
  • The DIRACOS installer follows the common pattern of being a shell script that exits followed by an arbitrary binary blob. In principle it is possible to create other kinds of installer with constructor however these are no deemed to be of interest at the current time.
  • Similarly to the original DIRACOS, releases are made by assigning a version number to a previous CI build. As constructor embeds the version number into the installer at build time, this means the version of the installed has to be edited for the binary artifact. Fortunately this is only embedded in the shell script at the start of the file, so it's a relatively simple string manipulation to modify it. This is done using in the main() function of scripts/make_release.py. As this is not an officially supported feature of constructor it is prone to changing at anytime.

Troubleshooting

This section contains a list of know issues that can occur.

Duplicate files

This error is of the form:

File 'include/event.h' found in multiple packages: libevent-2.1.10-hcdb4288_2.tar.bz2, libev-4.33-h516909a_0.tar.bz2

When this happens, the offending packages should be fixed upstream in conda-forge. As a temporary workaround, the ignore_duplicate_files key in construct.yaml can be changed to true.

diracos2's People

Contributors

chrisburr avatar fstagni avatar github-actions[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.