From nobody Fri Dec  1 17:38:05 2017
Content-Type: multipart/mixed; boundary="===============1995505308681564241=="
MIME-Version: 1.0

--===============1995505308681564241==
MIME-Version: 1.0
Content-Type: text/ucernvm-config; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="ucernvm.config"

[ucernvm-begin]
cvmfs_tag=cernvm-system-3.6.5.31
[ucernvm-end]

--===============1995505308681564241==
MIME-Version: 1.0
Content-Type: text/cloud-config; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="cernvm_context.yaml"

#cloud-config
# vim: syntax=yaml
#
# This configuration file sets up an environment to perforam OPAL analysis and reconstruction.
# For more information on the format of this script see the cloud-config documentation:
#
#   https://cloudinit.readthedocs.io
#
# The password of the opal user is opal2000, here supplied in it's hashed form. You can also
# use your public ssh key to gain access to the VM by adding
#
#     ssh-authorized-keys:
#       - <your ssh key>
#
# To the OPAL user below.
#
users:
  - name: opal
    sudo: ALL=(ALL) NOPASSWD:ALL
    lock_passwd: false
    passwd: $6$bx7DcMic$WXc9sTp3Eweq6H6/kNTgbttAmvOYP8xVhEu9eyvr0VtoRaXER8r8DIpeZ5wtE8KHZnA4QWCywxMsHa7VAXVYO1
    #ssh-authorized-keys:
    #  - [your ssh public key]
    shell: /bin/tcsh

write_files:
-   content: |
      # Directory where to mount FUSE
      export EOS_FUSE_MOUNTDIR=/eos/
      # MGM URL from where to mount FUSE
      export EOS_FUSE_MGM_ALIAS=eospublic.cern.ch
    path: /etc/sysconfig/eos
-   content: |
      CVMFS_REPOSITORIES=opal.cern.ch
      CVMFS_HTTP_PROXY=DIRECT
    path: /etc/cvmfs/default.local
-   content: |
      CVMFS_SERVER_URL=http://cvmfs-opal.cern.ch/cvmfs/opal.cern.ch
      CVMFS_PUBLIC_KEY=/etc/cvmfs/keys/opal.cern.ch.pub
    path: /etc/cvmfs/config.d/opal.cern.ch.conf
-   content: |
      -----BEGIN PUBLIC KEY-----
      MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAo8uKvscgW7FNxzb65Uhm
      yr8jPJiyrl2kVzb/hhgdfN14C0tCbfFoE6ciuZFg+9ytLeiL9pzM96gSC+atIFl4
      7wTgtAFO1W4PtDQBwA/IG2bnwvNrzk19ob0JYhjZlS9tYKeh7TKCub55+vMwcEbP
      urzo3WSNCzJngiGMh1vM5iSlGLpCdSGzdwxLGwc1VjRM7q3KAd7M7TJCynKqXZPX
      R2xiD6I/p4xv39AnwphCFSmDh0MWE1WeeNHIiiveikvvN+l8d/ZNASIDhKNCsz6o
      aFDsGXvjGy7dg43YzjSSYSFGUnONtl5Fe6y4bQZj1LEPbeInW334MAbMwYF4LKma
      yQIDAQAB
      -----END PUBLIC KEY-----
    path: /etc/cvmfs/keys/opal.cern.ch.pub
-   content: |
      setenv CERN /cvmfs/opal.cern.ch/cern
      setenv CERN_LEVEL pro
      setenv CERN_ROOT $CERN/$CERN_LEVEL
      setenv PATH $CERN_ROOT/bin:$PATH
      source /cvmfs/opal.cern.ch/env/opal_env.csh
    path: /home/opal/.tcshrc
-   content: |
      To get access to the opal data identify yourself using kerberos:

            kinit <account>@CERN.CH

      Where <account> is your CERN account. The account needs to be on the
      OPAL e-group. For contact information please consulte the CERN greybook
      or the DPHEP Portal:

          https://greybook.cern.ch
          http://cern.ch/dphep/content/opal

      Once you have authenticated yourself you will be able to access the
      data at

          /eos/experiment/opal/

      The OPAL code may be found at

          /cvmfs/opal.cern.ch/

      The opal account is set to use tcsh, and the .tcshrc will set up the
      OPAL environment for you. You can find some examples to get starterd in

          /cvmfs/opal.cern.ch/apps/examples

      The OPAL primer from the OPAL website will help you get started with
      the OPAL software

          https://opal.web.cern.ch/opal/manuals/oprimer/oprimer.pdf

      Have fun!

    path: /etc/motd


runcmd:
  - [chown, -R, "opal:opal", /home/opal]
  - [chkconfig, eosd, on]
  - [service, eosd, start]

--===============1995505308681564241==--
