You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Github repository: https://github.com/JCSDA/spack-stack

Documentation: https://spack-stack.readthedocs.io/en/latest/

spack-stack development

If you are going to contribute to the spack-stack repository, development is done by forking the spack-stack repository. This section contains steps to fork spack-stack from https://github.com/JCSDA/spack-stack, make changes, and issue a PR. 

CI testing

spack-stack CI testing is run by github workflow on a self-hosted runner, which we set up on an AWS instance. This section reviews how to set up a new workflow from scratch, beginning with launching an AWS instance.

Setting up an AWS Instance:

Prerequisites: TODO

  1. Log into the jcsda-usaf AWS console using the region us-east-2
  2. Navigate to the EC2.
  3. On the left hand side by, click "Instances". Then hit the top right orange button labeled "Launch instances". From here you can set up the instance. Below is an example of configuration used for a new spack-stack CI instance, which will be used to run the GNU tests. 
    Name and tags: <useful-name-for-spack-stack-ci>
    Application and OS Images (Amazon Machine Image): Ubuntu Server 22.04 LTS (HVM), SSD Volume Type; Architecture: 64-bit (x86) or 64-bit (arm)
    Instance type: c6a.8xlarge
    Key pair: <your_key_pair>
    Network settings:
        VPC: ParallelClusterVPC
        Subnet: public-us-east-2b
        Firewall: Select existing security group
        Common security group: global-ssh
    Configure storage: 600 GB
    Once everything is configured to your liking, click the orange "Launch instance" button.
  4. Navigate to your newly created instance (in EC2 → Instance → <new_instance_id>) and click "connect". You can go to the "SSH client" side and follow the instructions on the screen.

Install spack-stack on AWS Instance:

  1. After you are logged into the instance, the next step is to set up and install spack-stack. As user ubuntu create the directory ~/spack-stack/manual_testing. 
  2. Follow the "Prerequisites: Ubuntu (one-off) instructions" from the spack-stack documentation. Note, use "apt" instead of "apt-get".
  3. The follow spack-stack instructions to "Create a new environment". While spack-stack is running the install, you can move on to set up the SWAP space.

Add SWAP space:

These steps are in reference to https://www.digitalocean.com/community/tutorials/how-to-add-swap-space-on-ubuntu-22-04

  1. Log into the AWS instance

  2. Running free -h  will show no active swap running
  3. Use df -h  to check available space on the hard drive
  4. Create the SWAP file with 64G by running sudo fallocate -l 64G /swapfile 
  5. You can verify the size of the swapfile using ls -lh /swapfile 
  6. Next we will enable the swapfile using the following step:

    sudo chmod 600 /swapfile
    ls -lh /swapfile
    sudo mkswap /swapfile      # mark the file as swap space
    sudo swapon /swapfile      # enable
    sudo swapon --show         # verify
  7. Finally, make the swap file permanent:

    sudo cp /etc/fstab /etc/fstab.bak
    echo '/swapfile none swap sw 0 0' | sudo tee -a /etc/fstab
    cat /etc/fstab        # verify

Set up the CI runner:

TODO



  • No labels