-- HarinderSinghBawa - 2021-02-14

Distributed computing analysis in ATLAS Cloud Service using Amazon Web Services (AWS)

Instructions to get account in AWS:

Instructions to setup Elastic Cloud Computing (EC2) Instance on AWS :

** Launching and accessing an EC2 Instance:

A step-by-step guide to create own EC2 Instance is as follows:

  • Step 1: login to your AWS Dashboard: You were provided the account alias and username/password

  • Step2: From the AWS Dashboard, locate EC2 instances, particular the Launch Instance option. Note the "Launch Instance" Widget towards the center of the page

* Step3: Select Launch Instance. Depending on your use case, yourself or your organization may have a particular image “AMI” prepared, or you may be starting from scratch. The two options will be discussed in the next step

* Step4: Select Instance. : Selecting Launch Instance moves the user to this page * Picture4.jpg:

For this example, I selected an AMI generated from prior testing. Options found under "My AMIs". The instructions to generate these will be covered at the end of this document * Picture5.jpg:

Choose processor type. AWS offers a number of configurations. Determine and select what is best for your use-case


  • Picture6.jpg:

* Step 5: Continue through the following menus. The “correct” settings will be determined by your project requirements. For a a simple production VM, I have left them default for the purposes of this example. Click “Launch” once you are done configuring

* Step 6:If you have not yet done so, create a new key pair when prompted to, otherwise, selecting the appropriate existing key that you have already created. It is imperative that the resulting key is kept in a safe place once downloaded, as this is the only copy that you wil be given. Once downloaded, it is recommended to make multiple copies and back them up to safe and secure location(s). In this example, I created a key called “Example.” * Picture7.jpg:

  • Picture7.jpg:

  • Picture8.jpg:

* *Your web browser will download your keypair if you generated a new one, and will present this page: Click “View Instances” Once your instance is launched, you will be presented with a list of running instances. Your instance by default will not have a name. Select the pencil icon to edit the name field to properly label your instance*


  • Right click on your instance and select connect.

  • Follow the instructions on the pop-up widget. For this example, we will be connecting from a desktop Linux environment, so your connection method may vary depending on your operating system and procedures. The below is an example of the terminal commands used to navigate to the key generated earlier, and to connect to the newly created VM. Terminal output is included as well.

  • Picture11.jpg:

  • First, install any pending updates for the operating system. Most Linux-based operating systems make use of repositories, where software packages for that operating system are stored. When a piece of software is updated, its package in the repository is in turn updated. When a linux-based machine checks for updates, it is able to pull the updated packages from the repositories and update all the software installed. This makes maintenance quite easy as updating packages is a single command:

  • sudo yum update && sudo yum upgrade

  • CentOS employs the yum package manager. The sudo prefix instructs the computer to execute the command with root privileges. The first command, sudo yum update, instructs the package manager to check for any available updates in the repositories. Once it has done so, yum displays the available updates, if any. The second, sudo yum upgrade, instructs yum to download and install all available updates. The “&&” operator allows me to issue multiple commands simultaneously, to be executed in sequence. Once this is done, the actualy installation of CVMFS can begin. First, the CVMFS client package is installed:

  • sudo yum install -y cvmfs cvmfs-config-default cvmfs-auto-setup
  • Once installed, the client is set up and configured:
  • sudo cvmfs_config setup && sudo systemctl restart autofs cat </tmp/default.local && sudo mv /tmp/default.local
  • /etc/cvmfs/ default.local && sudo chown root:root
  • /etc/cvmfs/default.local
  • CVMFS_REPOSITORIES=atlas.cern.ch,atlascondb.cern.ch,grid.cern.ch CVMFS_HTTP_PROXY=DIRECT EOF

  • The above creates and then writes to a configuration file for CVMFS, effectively giving instructions on where its software sources will be located. No proxy is used, so instead of an IP address, CMFS_HTTP_PROXY is set to a DIRECT connection. Once the above is set, I found it useful to exit the SSH session, and restart the VM. This isn’t strictly necessary, but there were a few instances where the VM didn’t make use of the configuration file until after a reboot. At this point, I verify that CVMFS can communicate with its repositories (expected output included):

  • sudo cvmfs_config chksetup && sudo cvmfs_config probe Probing /cvmfs/atlas.cern.ch... OK Probing /cvmfs/atlascondb.cern.ch... OK Probing /cvmfs/grid.cern.ch... OK
  • Once it is confirmed that CVMFS is functioning, the Bash profile for this Centos machine is updated:
  • echo"ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ ATLASLocalRootBase" >>$HOME/.bash_profile && \ echo "alias setupATLAS='source /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/ user/atlasLocalSetup.sh'" >>$HOME/.bash_profile && \ echo
  • "export ATLAS_LOCAL_ROOT_BASE" >>$HOME/.bash_profile .
  • $HOME/.bash_profile
  • Once Bash is updated, one can now make use of CVMFS and Root:
  • setupATLAS lsetup "root 6.16.00-x86_64-centos7-gcc8-opt"
  • Now, to confirm that ROOT is working, a quick “hello world” test:
  • root.exe -q -e 'std::cout << "hello world" << std::endl;'

  • *If you didn't get cvmfs running: you can copy the setup shell file from ~bawa/public/AWS/setup_aws.sh and run source setup_aws.sh

Instructions to run panda jobs on AWS:

**Make Sure you have Quota in Fresno-AWS_SCRATCHDISK

*1. Transfer data on to “FRESNO-AWS_SCRATCHDISK” Go to following link: https://rucio-ui.cern.ch/r2d2/request

Enter Data Pattern: Choose name of dataset and select whether its Container/DataSet Click Select Rucio Storage Elements (RSEs): Enter: FRESNO-AWS_SCRATCHDISK Fill in Options: If any Review Summary and submit it. It would be approved by USATLAS

*2. Check data using rucio commands same as you do on lxplus • By default: Rucio account is centos. You need to change to your CERN username as • export RUCIO_ACCOUNT=”bawa”

*3. Submitting the job to Fresno AWS:

  • Login to AWS console.

  • setupATLAS

  • lsetup panda

  • Submit panda jobs using “prun”. Make sure you re-direct your panda jobs to “FRESNO-EKS-S3” using this flag in prun …….. --site=FRESNO-EKS-S3
Topic attachments
I Attachment History Action Size Date Who Comment
JPEGjpg Picture1.jpg r1 manage 79.2 K 2021-02-14 - 20:40 HarinderSinghBawa  
JPEGjpg Picture10.jpg r1 manage 51.3 K 2021-02-19 - 08:58 HarinderSinghBawa  
JPEGjpg Picture11.jpg r2 r1 manage 29.0 K 2021-02-19 - 09:11 HarinderSinghBawa  
JPEGjpg Picture2.jpg r1 manage 307.6 K 2021-02-14 - 21:10 HarinderSinghBawa  
JPEGjpg Picture3.jpg r1 manage 31.5 K 2021-02-14 - 21:16 HarinderSinghBawa  
JPEGjpg Picture4.jpg r1 manage 356.6 K 2021-02-14 - 21:22 HarinderSinghBawa  
JPEGjpg Picture5.jpg r1 manage 128.1 K 2021-02-14 - 21:22 HarinderSinghBawa  
JPEGjpg Picture6.jpg r1 manage 300.6 K 2021-02-14 - 21:28 HarinderSinghBawa  
JPEGjpg Picture7.jpg r1 manage 81.8 K 2021-02-14 - 21:46 HarinderSinghBawa  
JPEGjpg Picture8.jpg r1 manage 136.3 K 2021-02-14 - 21:46 HarinderSinghBawa  
JPEGjpg Picture9.jpg r1 manage 181.2 K 2021-02-14 - 21:50 HarinderSinghBawa  
Edit | Attach | Watch | Print version | History: r5 < r4 < r3 < r2 < r1 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r5 - 2021-02-23 - HarinderSinghBawa
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Sandbox All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2021 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback