Closed pnispero closed 2 months ago
Contents of s3df lcls/epics (not in official directory just a test directory) before deployment
(ana-4.0.62-py3) [pnispero@sdfiana017 ~]$ find /sdf/group/ad/eed/lcls/
/sdf/group/ad/eed/lcls/
/sdf/group/ad/eed/lcls/tools
/sdf/group/ad/eed/lcls/epics
/sdf/group/ad/eed/lcls/epics/iocData
/sdf/group/ad/eed/lcls/epics/iocCommon
/sdf/group/ad/eed/lcls/epics/cpuCommon
/sdf/group/ad/eed/lcls/epics/iocTop
/sdf/group/ad/eed/lcls/epics/ioc
/sdf/group/ad/eed/lcls/epics/ioc/data
/sdf/group/ad/eed/lcls/physics
/sdf/group/ad/eed/lcls/package
(ana-4.0.62-py3) [pnispero@sdfiana017 ~]$
Run Deployment of test-ioc with bs run deployment
(adbs-env) [pnispero@sdfiana018 test-ioc]$ bs run deployment
Checking current directory if a component...
== ADBS == At the moment, deployment only for IOCs is supported
[?] Initial deployment?:
> True
False
[?] Point deployment to your user-space repo?:
> True
False
[?] What facilities to deploy to? (Arrow keys for selection, enter if done):
> [X] S3DF
[ ] LCLS
[ ] FACET
[ ] TestFac
INFO-root:[run_commands.py:37 - parse_manifest() ] {'test-ioc-1': 'test-ioc-1.0.0', 'test-ioc-2': 'test-ioc-1.0.0'}
[?] For S3DF Dev, which IOC's do you want to deploy?:
> [X] ALL
[ ] test-ioc-1
[ ] test-ioc-2
[?] Specify full component tagname (ex: test-ioc-1.0.0): test-ioc-1.0.0
INFO-root:[run_commands.py:65 - run_ansible_playbook() ] ['ansible-playbook', '-i', '/sdf/home/p/pnispero/BuildSystem/ansible/ioc_module/global_inventory.ini', '-l', 'S3DF', '/sdf/home/p/pnispero/BuildSystem/ansible/ioc_module/ioc_deploy.yml', '--extra-vars', '{"initial": true, "component_name": "test-ioc", "tag": "test-ioc-1.0.0", "user": "pnispero", "tarball": "/sdf/home/p/pnispero/test-ioc/build_results/test-ioc-1.0.0.tar.gz", "ioc_dict": {"test-ioc-1": "test-ioc-1.0.0", "test-ioc-2": "test-ioc-1.0.0"}, "output_path": "/sdf/home/p/pnispero/test-ioc/ADBS_TMP", "facility": "S3DF", "user_src_repo": "/sdf/home/p/pnispero/test-ioc"}']
PLAY [all] *********************************************************************
TASK [Gathering Facts] *********************************************************
ok: [localhost]
PLAY [Initial IOC Deployment] **************************************************
TASK [Create component directory at /sdf/group/ad/eed/lcls/epics/iocTop/test-ioc] ***
changed: [localhost]
TASK [Create ioc directory at $IOC /sdf/group/ad/eed/lcls/epics/iocCommon/<ioc>] ***
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocCommon - test-ioc-1)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocCommon - test-ioc-2)
TASK [Create sym link /sdf/group/ad/eed/lcls/epics/iocCommon/<ioc>/iocSpecificRelease to point to /sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/<tag>] ***
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-1/iocSpecificRelease -> /sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-2/iocSpecificRelease -> /sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0)
TASK [Create ioc directory in /sdf/group/ad/eed/lcls/epics/iocData/<ioc>] ******
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData - test-ioc-1)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData - test-ioc-2)
TASK [Create multiple data directories in /sdf/group/ad/eed/lcls/epics/iocData/<ioc>] ***
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1 - archive)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1 - autosave)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1 - autosave-req)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1 - iocInfo)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1 - restore)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1 - yaml)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2 - archive)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2 - autosave)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2 - autosave-req)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2 - iocInfo)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2 - restore)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2 - yaml)
TASK [Add startup.cmd/st.cmd for the IOC at /sdf/group/ad/eed/lcls/epics/iocCommon/<ioc>] ***
failed: [localhost] (item=== ADBS == test-ioc-1) => {"ansible_loop_var": "item", "changed": false, "item": {"key": "test-ioc-1", "value": "test-ioc-1.0.0"}, "msg": "== ADBS == UNFINSHED. Please do this step manually."}
failed: [localhost] (item=== ADBS == test-ioc-2) => {"ansible_loop_var": "item", "changed": false, "item": {"key": "test-ioc-2", "value": "test-ioc-1.0.0"}, "msg": "== ADBS == UNFINSHED. Please do this step manually."}
TASK [== ADBS == Continue despite previous error] ******************************
ok: [localhost] => {
"msg": "Startup.cmd automation is unfinished, please create the startup.cmd manually."
}
PLAY [Deploy app, and update envPaths] *****************************************
TASK [Extract build results to '/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc'] ***
changed: [localhost]
TASK [Update envPaths (call cram script for this) 'S3DF'] **********************
changed: [localhost]
PLAY [Normal IOC Deployment] ***************************************************
TASK [Update sym link /sdf/group/ad/eed/lcls/epics/iocCommon/<ioc>/iocSpecificRelease to point to /sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/<tag>] ***
skipping: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-1/iocSpecificRelease -> /sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0)
skipping: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-2/iocSpecificRelease -> /sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0)
skipping: [localhost]
TASK [Override /sdf/group/ad/eed/lcls/epics/iocCommon/<ioc>/iocSpecificRelease to point to /sdf/home/p/pnispero/test-ioc] ***
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-1/iocSpecificRelease -> /sdf/home/p/pnispero/test-ioc)
changed: [localhost] => (item=/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-2/iocSpecificRelease -> /sdf/home/p/pnispero/test-ioc)
PLAY RECAP *********************************************************************
localhost : ok=10 changed=8 unreachable=0 failed=0 skipped=1 rescued=1 ignored=0
[WARNING]: Platform linux on host localhost is using the discovered Python
interpreter at /sdf/home/p/pnispero/.conda/envs/adbs-env/bin/python3.12, but
future installation of another Python interpreter could change the meaning of
that path. See https://docs.ansible.com/ansible-
core/2.17/reference_appendices/interpreter_discovery.html for more information.
[WARNING]: Cannot set fs attributes on a non-existent symlink target. follow
should be set to False to avoid this.
Playbook execution finished with return code: 0
(adbs-env) [pnispero@sdfiana018 test-ioc]$
Contents of s3df lcls/epics (not in official directory just a test directory) AFTER deployment
(ana-4.0.62-py3) [pnispero@sdfiana017 ~]$ find /sdf/group/ad/eed/lcls/
/sdf/group/ad/eed/lcls/
/sdf/group/ad/eed/lcls/tools
/sdf/group/ad/eed/lcls/epics
/sdf/group/ad/eed/lcls/epics/iocData
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2/archive
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2/autosave-req
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2/iocInfo
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2/yaml
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2/restore
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-2/autosave
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1/autosave-req
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1/iocInfo
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1/restore
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1/archive
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1/yaml
/sdf/group/ad/eed/lcls/epics/iocData/test-ioc-1/autosave
/sdf/group/ad/eed/lcls/epics/iocCommon
/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-2
/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-2/iocSpecificRelease
/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-1
/sdf/group/ad/eed/lcls/epics/iocCommon/test-ioc-1/iocSpecificRelease
/sdf/group/ad/eed/lcls/epics/cpuCommon
/sdf/group/ad/eed/lcls/epics/iocTop
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/iocBoot
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/iocBoot/iocGuardianTest
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/iocBoot/iocGuardianTest/Makefile
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/iocBoot/iocGuardianTest/st.cmd
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/iocBoot/iocGuardianTest/envPaths
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/iocBoot/Makefile
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/db
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/db/guardian_device_data.db
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/db/guardian_snapshot.db
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/db/test.db
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/dbd
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/dbd/Guardian.dbd
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/bin
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/bin/linuxRT-x86_64
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/bin/linuxRT-x86_64/Guardian
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/bin/rhel7-x86_64
/sdf/group/ad/eed/lcls/epics/iocTop/test-ioc/test-ioc-1.0.0/bin/rhel7-x86_64/Guardian
/sdf/group/ad/eed/lcls/epics/ioc
/sdf/group/ad/eed/lcls/epics/ioc/data
/sdf/group/ad/eed/lcls/physics
/sdf/group/ad/eed/lcls/package
(ana-4.0.62-py3) [pnispero@sdfiana017 ~]$
Notes
TASK [Add startup.cmd/st.cmd for the IOC at /sdf/group/ad/eed/lcls/epics/iocCommon/<ioc>] ***
This is because automation may be hard since there can be a variety of st.cmd's. But the user is notified to do it manually.also note that there are command line arguments you can use to answer any of the initial questions it asks like the initial deployment is -i
, and the point deployment to user-space repo is o
(for override), and the facilities to deploy to has -s -l -t -f
and so on. Like this:
(adbs-env) [pnispero@sdfiana018 test-ioc]$ bs run deployment -h
Usage: bs run deployment [OPTIONS]
Run a deployment
Options: -c, --component TEXT Component Name -b, --branch TEXT Branch Name -i, --initial Initial deployment -o, --override Point deployment to your user-space repo -s, --s3df Deploy to S3DF Dev -l, --lcls Deploy to LCLS Prod -f, --facet Deploy to FACET Prod -t, --testfac Deploy to TestFac Prod -h, --help Show this message and exit. (adbs-env) [pnispero@sdfiana018 test-ioc]$
Build and deploy build results for an IOC app - Multiple IOCs
Building build results
Refer to issue #7 for the building. It will remain exactly the same here, only the deployment will be different.
Deploying build results