Information
We are currently investigating an issue with the editor of some pages. Please save your work and avoid to create new pages until this banner is gone.
In this tutorial we will write and run example ACS modules in Python, Java and C++ inside a Docker container based in a CentOS 7 image, in an Ubuntu 20.04 machine.
sudo apt update # Git LFS sudo apt install git-lfs # SELinux sudo apt install policycoreutils selinux-utils selinux-basics sudo selinux-activate sudo selinux-config-enforcing # Docker sudo apt install apt-transport-https ca-certificates curl software-properties-common curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" sudo apt install docker-ce sudo usermod -aG docker ${USER} # Docker Compose sudo curl -L "https://github.com/docker/compose/releases/download/1.27.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose sudo chmod +x /usr/local/bin/docker-compose
git clone https://bitbucket.alma.cl/scm/asw/acs.git
Edit docker .env file (you can use your favourite editor)
cd acs/Virtualization/Docker/Dev/ # check current user info id $USER # edit configuration file sudo nano .env
USER_NAME=<my_user> GROUP_NAME=<my_group> USER_ID=<my_user_id> GROUP_ID=<my_group_id> # ALMA_DIR and HOME_DIR will be created in your machine and used by your acs container. Change these values as needed. ALMA_DIR=/external/docker/alma HOME_DIR=/external/docker/home REPO_DIR=/absolute/path/to/cloned/repo IMAGE_OS=centos7 CONTAINER_DIR=centos7
USER_NAME=developer GROUP_NAME=developer USER_ID=1000 GROUP_ID=1000 ALMA_DIR=/external/docker/alma HOME_DIR=/external/docker/home REPO_DIR=/home/developer/code/acs IMAGE_OS=centos7 CONTAINER_DIR=centos7
To run a Docker container with ACS:
docker-compose run --name acs_centos7_env centos7 bash
To open a terminal inside the container
docker exec -it acs_centos7_env bash
Check Installing ACS for full details. TL;DR:
Install external products
# set ownership for directories sudo chown $USER:$USER /external/docker/ /external/docker/alma/ /external/docker/home/ # install external products source /Repos/LGPL/acsBUILD/config/.acs/.bash_profile.acs cd /Repos/ExtProd/INSTALL make all
You should see something like:
> make all WARNING: Do not close this terminal: some build might fail! Target directory ACS-2021AUG already exist. 2021-11-30T13:03:59 buildTclTk [3m17.215s] [ OK ] 2021-11-30T13:07:16 buildTAO [10m53.151s] [ OK ] 2021-11-30T13:18:09 buildMaven [0m0.134s] [ OK ] 2021-11-30T13:18:09 buildJavaDependencies [5m35.790s] [ OK ] 2021-11-30T13:23:45 buildExternalDependencies [0m5.345s] [ OK ] 2021-11-30T13:23:50 buildAnt [0m16.545s] [ OK ] 2021-11-30T13:24:07 buildJacorb ==== Building JacORB from: /Repos/ExtProd/INSTALL/../PRODUCTS into: /alma/ACS-2021AUG ==== Copying sources ==== Cumulative Patch ==== JacORB Version Patch ========= Done with unpacking and patching, can compile now... ========== ==== Building jars ==== Build Notification service IDL ==== Copy extra IDLs CosProperty(Service), DsLogAdmin and AVStreams into JacORB directory tree ==== Build with extra IDLs ======== SUCCESS!!!========== [3m47.443s] [ OK ] 2021-11-30T13:27:54 buildPython [2m6.369s] [ OK ] 2021-11-30T13:30:01 buildPyModules [1m56.054s] [ OK ] 2021-11-30T13:31:57 buildOmniORB [7m59.542s] [ OK ] 2021-11-30T13:39:56 buildEclipse [3m16.521s] [ OK ] 2021-11-30T13:43:13 buildSwig [1m12.888s] [ OK ] 2021-11-30T13:44:26 buildBoost [3m58.007s] [ OK ] WARNING: Now log out and login again to make sure that the environment is re-evaluated! __oOo__ 2021-11-30T13:48:24 buildTools script has finished . . . 'all' done
Build ACS
# After installing external products, log into a new terminal inside your container (in order to load external products correctly, e.g. Python), and build ACS. cd /Repos make build
You should see something like:
> make build Evaluating current ACS TAG from https://bitbucket.alma.cl/scm/asw/acs.git REPO tag is: master ############ Clean Build Log File: build.log ################# ############ Check directory tree for modules ################# ############ Prepare installation areas ################# ############ (Re-)build ACS Software ################# ############ LGPL/Kit/doc SRC ############ LGPL/Kit/acs SRC ############ LGPL/Kit/acstempl SRC ############ LGPL/Kit/acsutilpy SRC ############ LGPL/Tools MAIN ############ (Re-)build Tools Software ################# ############ tat MAIN ############ expat WS ############ loki WS ############ extjars MAIN ############ antlr MAIN ############ hibernate MAIN ############ extpy MAIN ############ getopt MAIN ############ xercesc MAIN ############ xercesj MAIN ############ castor MAIN ############ xsddoc MAIN ############ extidl WS ############ shunit2 MAIN ############ scxml_apache MAIN ############ DONE (Re-)build Tools Software ################# ############ LGPL/CommonSoftware/jacsutil SRC ############ LGPL/CommonSoftware/xmljbind SRC ############ LGPL/CommonSoftware/xmlpybind SRC ############ LGPL/CommonSoftware/acserridl WS ############ LGPL/CommonSoftware/acsidlcommon WS ############ LGPL/CommonSoftware/acsutil WS ############ LGPL/CommonSoftware/acsstartup SRC ############ LGPL/CommonSoftware/loggingidl WS ############ LGPL/CommonSoftware/logging WS ############ LGPL/CommonSoftware/acserr WS ############ LGPL/CommonSoftware/acserrTypes WS ############ LGPL/CommonSoftware/acsQoS WS ############ LGPL/CommonSoftware/acsthread WS ############ LGPL/CommonSoftware/acscomponentidl WS ############ LGPL/CommonSoftware/cdbidl WS ############ LGPL/CommonSoftware/maciidl WS ############ LGPL/CommonSoftware/baciidl WS ############ LGPL/CommonSoftware/acsncidl WS ############ LGPL/CommonSoftware/repeatGuard WS ############ LGPL/CommonSoftware/acsjlog SRC ############ LGPL/CommonSoftware/loggingts WS ############ LGPL/CommonSoftware/loggingtsTypes WS ############ LGPL/CommonSoftware/jacsutil2 SRC ############ LGPL/CommonSoftware/cdb WS ############ LGPL/CommonSoftware/cdbChecker SRC ############ LGPL/CommonSoftware/codegen SRC ############ LGPL/CommonSoftware/cdb_rdb SRC ############ LGPL/CommonSoftware/acsalarmidl WS ############ LGPL/CommonSoftware/acsalarm SRC ############ LGPL/CommonSoftware/acsContainerServices WS ############ LGPL/CommonSoftware/acscomponent WS ############ LGPL/CommonSoftware/recovery WS ############ LGPL/CommonSoftware/basenc WS ############ LGPL/CommonSoftware/archiveevents WS ############ LGPL/CommonSoftware/parameter SRC ############ LGPL/CommonSoftware/baci WS ############ LGPL/CommonSoftware/enumprop WS ############ LGPL/CommonSoftware/acscallbacks SRC ############ LGPL/CommonSoftware/acsdaemonidl WS ############ LGPL/CommonSoftware/jacsalarm SRC ############ LGPL/CommonSoftware/jmanager SRC ############ LGPL/CommonSoftware/maci WS ############ LGPL/CommonSoftware/task SRC ############ LGPL/CommonSoftware/acstime WS ############ LGPL/CommonSoftware/acsnc WS ############ LGPL/CommonSoftware/acsdaemon WS ############ LGPL/CommonSoftware/acslog WS ############ LGPL/CommonSoftware/acstestcompcpp SRC ############ LGPL/CommonSoftware/acsexmpl WS ############ LGPL/CommonSoftware/jlogEngine SRC ############ LGPL/CommonSoftware/acspycommon SRC ############ LGPL/CommonSoftware/acsalarmpy SRC ############ LGPL/CommonSoftware/acspy SRC ############ LGPL/CommonSoftware/comphelpgen SRC ############ LGPL/CommonSoftware/XmlIdl SRC ############ LGPL/CommonSoftware/define WS ############ LGPL/CommonSoftware/acstestentities SRC ############ LGPL/CommonSoftware/jcont SRC ############ LGPL/CommonSoftware/jcontnc SRC ############ LGPL/CommonSoftware/nsStatisticsService SRC ############ LGPL/CommonSoftware/jacsalarmtest SRC ############ LGPL/CommonSoftware/jcontexmpl SRC ############ LGPL/CommonSoftware/jbaci SRC ############ LGPL/CommonSoftware/monitoring MAIN ############ (Re-)build monitoring Software ################# ############ monicd WS ############ moncollect WS ############ monblobber MAIN ############ moncontroller MAIN ############ DONE (Re-)build monitoring Software ################# ############ LGPL/CommonSoftware/acssamp WS ############ LGPL/CommonSoftware/mastercomp SRC ############ LGPL/CommonSoftware/acspyexmpl SRC ############ LGPL/CommonSoftware/nctest WS ############ LGPL/CommonSoftware/acscommandcenter SRC ############ LGPL/CommonSoftware/acssim SRC ############ LGPL/CommonSoftware/bulkDataNT SRC ### ==> FAILED all ! ### ==> FAILED install ! ############ LGPL/CommonSoftware/bulkData SRC ############ LGPL/CommonSoftware/containerTests MAIN ############ (Re-)build(SUBSYSTEM) Software ################# ############ contLogTest MAIN ############ contNcTest MAIN ############ corbaRefPersistenceTest MAIN ############ contHandleTest MAIN ############ DONE (Re-)build containerTest Software ################# ############ LGPL/CommonSoftware/acscourse WS ############ LGPL/CommonSoftware/ACSLaser MAIN ############ (Re-)build Laser Software ################# ############ alarmCommon MAIN ############ laser-extlib MAIN ############ acs-jms MAIN ############ cmw-mom MAIN ############ laser-util MAIN ############ laser-source MAIN ############ laser-source-cpp MAIN ############ laser-source-python MAIN ############ gp-openide MAIN ############ gp MAIN ############ laser-core MAIN ############ alarmHibernate MAIN ############ laser-client MAIN ############ laser-definition MAIN ############ laser-console MAIN ############ alarm-clients MAIN ############ demo MAIN ############ managerTest MAIN ############ baciPropsTest MAIN ############ alarmTests MAIN ############ containerTest MAIN ############ DONE (Re-)build Laser Software ################# ############ LGPL/CommonSoftware/acsGUIs MAIN ############ (Re-)build ACS GUIs ################# ############ acsGUIutil MAIN ############ acsEclipseUtils MAIN ############ acssampGUI MAIN ############ cdbBrowser MAIN ############ errorBrowser MAIN ############ eventGUI MAIN ############ jlog MAIN ############ logLevelGUI MAIN ############ logTools MAIN ############ objexp MAIN ############ alarmSourcePanel MAIN ############ AlarmSystemProfiler MAIN ############ alarmPanel MAIN ############ DONE (Re-)build ACS GUIs ################# ############ LGPL/CommonSoftware/acsExtras MAIN ############ (Re-)build ACS EXTRAS ################# ############ acsXmlFileStore MAIN ############ DONE (Re-)build ACS EXTRAS ################# ############ Benchmark/util SRC ############ Benchmark/analyzer SRC ############ LGPL/acsBUILD SRC ############ FAILED (Re-)build ACS Software ################# make: *** [update] Error 1
If you have any issues installing ACS or its components try the following.
> make all WARNING: Do not close this terminal: some build might fail! Target directory already exist. 2021-11-29T18:18:55 buildTclTk [3m10.381s] [ OK ] 2021-11-29T18:22:05 buildTAO [0m2.881s] [==> FAILED] 2021-11-29T18:22:08 buildMaven [0m0.005s] [==> FAILED] 2021-11-29T18:22:08 buildJavaDependencies [0m0.006s] [==> FAILED] 2021-11-29T18:22:08 buildExternalDependencies [0m0.025s] [==> FAILED] 2021-11-29T18:22:08 buildAnt [0m0.004s] [==> FAILED] 2021-11-29T18:22:08 buildJacorb ==== Building JacORB from: /Repos/ExtProd/INSTALL/../PRODUCTS into: / jacorb: Env Variable JACORB_HOME no set. Review your deployment [0m0.006s] [==> FAILED] 2021-11-29T18:22:08 buildPython [0m0.016s] [ OK ] 2021-11-29T18:22:08 buildPyModules [0m0.007s] [==> FAILED] 2021-11-29T18:22:08 buildOmniORB [0m22.676s] [ OK ] 2021-11-29T18:22:31 buildEclipse [9m54.753s] [ OK ] 2021-11-29T18:32:25 buildSwig [0m25.429s] [ OK ] 2021-11-29T18:32:51 buildBoost [0m20.637s] [ OK ] WARNING: Now log out and login again to make sure that the environment is re-evaluated! __oOo__ 2021-11-29T18:33:11 buildTools script has finished . . . 'all' done
Some components might fail during this process. There are logs for each component in /Repos/ExtProd/INSTALL which you can check for diagnostics. Check permissions for directories /external/docker, /external/docker/alma, /external/docker/home in your machine, the owner and group should be your user (not root).
> make build Evaluating current ACS TAG from https://bitbucket.alma.cl/scm/asw/acs.git REPO tag is: master ############ Clean Build Log File: build.log ################# ############ Check directory tree for modules ################# ############ Prepare installation areas ################# ### ==> FAILED!
You can try to reset the repo and build again:
sudo git clean -fdx -- . make build