This repository has been archived by the owner on Sep 29, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15 from lsst-ts/feature/couger01/dm-18753
Feature/couger01/dm 18753
- Loading branch information
Showing
15 changed files
with
392 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,113 @@ | ||
# TS Simulators | ||
A docker compose file (in yaml format) that invokes the T&S simulators required to run integration scripts. | ||
|
||
## Usage | ||
|
||
Clone the ts_Dockefiles repository: | ||
```sh | ||
$ git clone -b feature/couger01/dm-18753 https://github.com/lsst-ts/ts_Dockerfiles.git | ||
``` | ||
|
||
Navigate to the Compose/Simulators directory: | ||
```sh | ||
$ cd Compose/Simulators | ||
``` | ||
|
||
Invoke the simulators in dettached mode file: | ||
```sh | ||
$ docker-compose up -d | ||
``` | ||
|
||
Check Containers: | ||
```sh | ||
// Check Names, Image Id & Size | ||
$ docker-compose images | ||
|
||
// Check ID | ||
$ docker ps | ||
|
||
// Check Status | ||
$ docker-compose ps | ||
|
||
// Check Specific Logs | ||
$ docker-compose logs -f <container-name> | ||
|
||
// Check All Logs | ||
$ docker-compose logs | ||
|
||
// Grab the IP address of a running container | ||
$ docker inspect --format='{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' <container-name OR id> | ||
|
||
// View the details of docker network | ||
$ docker network inspect <my-bridge-network> | ||
|
||
// View container usage of cpu, memory, etc. | ||
$ docker stats $(docker ps --format={{.Names}}) | ||
``` | ||
|
||
Manipulate Containers: | ||
```sh | ||
// Execute a command inside the running container (interactive mode) | ||
$ docker exec -it <container-id> <command> | ||
|
||
// Execute a command inside the running container (detached mode) | ||
$ docker exec -d <container-id> <command> | ||
|
||
// Stop Specific Container | ||
$ docker-compose stop <container-name> | ||
|
||
// Remove Specific Container | ||
$ docker-compose rm <container-name> | ||
|
||
// Start Specific Containers | ||
$ docker-compose start <container-name> | ||
|
||
// Stop & Remove Specific Container | ||
$ docker-compose down | ||
|
||
// Stop All Containers | ||
$ docker-compose stop | ||
|
||
// Remove All Container | ||
$ docker-compose rm <container-name> | ||
|
||
// Start All Containers | ||
$ docker-compose start <container-name> | ||
|
||
// Stop & Remove All Container | ||
$ docker-compose down | ||
``` | ||
|
||
## Running Integration Tests | ||
|
||
```sh | ||
docker-compose run --rm simulation-tests | ||
python ~/scripts/atptgatmcsintegration.py | ||
python ~/scripts/dometrajectorymcs.py | ||
``` | ||
|
||
If successful, logs will indicate that the script state was complete. | ||
Else, there may be intermittent failures, due to timeouts. | ||
In that case, try running the script again. | ||
|
||
```sh | ||
<SCRIPT_STATE:Complete> | ||
``` | ||
|
||
--- | ||
|
||
## License | ||
|
||
LSST Data Management System Software | ||
Copyright © 2008-2019 AURA/LSST. | ||
|
||
This product includes software developed by the | ||
LSST Project (http://www.lsst.org/) with contributions made at LSST partner | ||
institutions. The list of partner institutions is found at: | ||
http://www.lsst.org/lsst/about/contributors . | ||
|
||
Use and redistribution of this software is covered by the GNU Public License | ||
Version 3 (GPLv3) or later, as detailed below. A copy of the GPLv3 is also | ||
available at [GNU Licenses](http://www.gnu.org/licenses/). | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
version: '3.6' | ||
|
||
services: | ||
|
||
atmcs-sim: | ||
image: lsstts/at_mcs_sim:3.9-0.4 | ||
container_name: atmcs-sim | ||
environment: | ||
- LSST_DDS_DOMAIN=atsimulatorcsc | ||
network_mode: "bridge" | ||
|
||
entrypoint: ["/home/saluser/.setup.sh"] | ||
|
||
atdome-sim: | ||
image: lsstts/at_dome_sim:3.9-0.5 | ||
container_name: atdome-sim | ||
environment: | ||
- LSST_DDS_DOMAIN=atsimulatorcsc | ||
network_mode: "bridge" | ||
|
||
entrypoint: ["/home/saluser/.setup.sh"] | ||
|
||
atdometrajectory-sim: | ||
image: lsstts/at_dome_trajectory_sim:3.9-0.6a | ||
container_name: atdometrajectory-sim | ||
environment: | ||
- LSST_DDS_DOMAIN=atsimulatorcsc | ||
network_mode: "bridge" | ||
|
||
entrypoint: ["/home/saluser/.setup.sh"] | ||
|
||
atpneumatics-sim: | ||
image: lsstts/at_pneumatics_sim:3.9-0.2 | ||
container_name: atpneumatics-sim | ||
environment: | ||
- LSST_DDS_DOMAIN=atsimulatorcsc | ||
network_mode: "bridge" | ||
|
||
entrypoint: ["/home/saluser/.setup.sh"] | ||
|
||
ataos-sim: | ||
image: lsstts/ataos:v0.2.1 | ||
container_name: ataos-sim | ||
environment: | ||
- LSST_DDS_DOMAIN=atsimulatorcsc | ||
network_mode: "bridge" | ||
|
||
entrypoint: ["/home/saluser/.setup.sh"] | ||
|
||
atptg-sim: | ||
image: tiagorib/ptkernel:develop | ||
container_name: atptg-sim | ||
environment: | ||
- LSST_DDS_DOMAIN=atsimulatorcsc | ||
network_mode: "bridge" | ||
|
||
athexapod-sim: | ||
image: lsstts/ts_athexapod | ||
container_name: athexapod-sim | ||
environment: | ||
- LSST_DDS_DOMAIN=atsimulatorcsc | ||
network_mode: "bridge" | ||
|
||
hexapod-sim: | ||
image: couger01/hexapod_simulator | ||
container_name: hexapod-sim | ||
network_mode: "bridge" | ||
|
||
simulation-tests: | ||
image: lsstts/simulation_tests:latest | ||
container_name: simulation-tests | ||
environment: | ||
- LSST_DDS_DOMAIN=atsimulatorcsc | ||
network_mode: "bridge" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM lsstts/develop-env:20190508 | ||
|
||
WORKDIR /home/saluser/repos | ||
RUN cd ts_config_attcs && git pull | ||
|
||
WORKDIR /home/saluser | ||
COPY setup.sh /home/saluser/.setup.sh | ||
|
||
ENTRYPOINT ["/bin/bash", "--"] | ||
CMD ["/home/saluser/.setup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Source this file when starting the container to set it up | ||
|
||
echo "#" | ||
echo "# Loading LSST Stack" | ||
. /opt/lsst/software/stack/loadLSST.bash | ||
setup lsst_distrib | ||
echo "#" | ||
echo "# Loading sal environment" | ||
. repos/ts_sal/setup.env | ||
echo "#" | ||
echo "# Setting up sal, salobj and scriptqueue" | ||
|
||
setup ts_xml -t current | ||
setup ts_sal -t current | ||
setup ts_salobj -t current | ||
setup ts_scriptqueue -t current | ||
setup ts_config_attcs -t current | ||
|
||
setup ts_ATDome -t $USER | ||
|
||
cd /home/saluser/repos/ts_ATDome/bin/ | ||
|
||
echo "# Starting ATDome Simulator CSC" | ||
python ./run_atdome.py -s |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM lsstts/develop-env:20190508 | ||
|
||
USER saluser | ||
WORKDIR /home/saluser/repos | ||
|
||
WORKDIR /home/saluser | ||
COPY setup.sh /home/saluser/.setup.sh | ||
|
||
ENTRYPOINT ["/bin/bash", "--"] | ||
CMD ["/home/saluser/.setup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Source this file when starting the container to set it up | ||
|
||
echo "#" | ||
echo "# Loading LSST Stack" | ||
. /opt/lsst/software/stack/loadLSST.bash | ||
setup lsst_distrib | ||
echo "#" | ||
echo "# Loading sal environment" | ||
. repos/ts_sal/setup.env | ||
echo "#" | ||
echo "# Setting up sal, salobj and scriptqueue" | ||
|
||
setup ts_xml -t current | ||
setup ts_sal -t current | ||
setup ts_salobj -t current | ||
setup ts_scriptqueue -t current | ||
setup ts_config_attcs -t current | ||
|
||
setup ts_ATDomeTrajectory -t $USER | ||
|
||
cd /home/saluser/repos/ts_ATDomeTrajectory/bin/ | ||
|
||
echo "# Starting ATDomeTrajectory Simulator CSC" | ||
python ./run_atdometrajectory.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
FROM lsstts/develop-env:20190508 | ||
WORKDIR /home/saluser/repos | ||
WORKDIR /home/saluser | ||
|
||
COPY setup.sh /home/saluser/.setup.sh | ||
|
||
ENTRYPOINT ["/bin/bash", "--"] | ||
CMD ["/home/saluser/.setup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Source this file when starting the container to set it up | ||
|
||
echo "#" | ||
echo "# Loading LSST Stack" | ||
. /opt/lsst/software/stack/loadLSST.bash | ||
setup lsst_distrib | ||
echo "#" | ||
echo "# Loading sal environment" | ||
. repos/ts_sal/setup.env | ||
echo "#" | ||
echo "# Setting up sal, salobj and ATMCSSimulator" | ||
|
||
setup ts_xml -t current | ||
setup ts_sal -t current | ||
setup ts_salobj -t current | ||
|
||
setup ts_ATMCSSimulator -t $USER | ||
|
||
echo "# Starting ATMCSSimulator CSC" | ||
|
||
/home/saluser/repos/ts_ATMCSSimulator/bin/run_atmcs_simulator.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
FROM lsstts/develop-env:20190508 | ||
|
||
WORKDIR /home/saluser/repos | ||
RUN git clone https://github.com/lsst-ts/ts_ATPneumaticsSimulator.git && cd ts_ATPneumaticsSimulator && git checkout v0.2.0 && source /opt/lsst/software/stack/loadLSST.bash && source /home/saluser/repos/ts_sal/setup.env && setup sconsUtils -t current && setup ts_sal -t current && setup ts_salobj -t current && make_salpy_libs.py ATPneumatics && eups declare -r . ts_ATPneumaticsSimulator -t $USER && setup ts_ATPneumaticsSimulator -t $USER && scons | ||
|
||
WORKDIR /home/saluser | ||
COPY setup.sh /home/saluser/.setup.sh | ||
|
||
ENTRYPOINT ["/bin/bash", "--"] | ||
CMD ["/home/saluser/.setup.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#!/usr/bin/env bash | ||
|
||
# Source this file when starting the container to set it up | ||
|
||
echo "#" | ||
echo "# Loading LSST Stack" | ||
. /opt/lsst/software/stack/loadLSST.bash | ||
setup lsst_distrib | ||
echo "#" | ||
echo "# Loading sal environment" | ||
. repos/ts_sal/setup.env | ||
echo "#" | ||
echo "# Setting up sal, salobj and scriptqueue" | ||
|
||
setup ts_xml -t current | ||
setup ts_sal -t current | ||
setup ts_salobj -t current | ||
setup ts_scriptqueue -t current | ||
|
||
setup ts_ATPneumaticsSimulator -t $USER | ||
|
||
cd /home/saluser/repos/ts_ATPneumaticsSimulator/bin/ | ||
|
||
echo "# Starting ATPneumatics Simulator CSC" | ||
python ./run_atpneumatics_simulator.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM lsstts/develop-env:20190508 | ||
WORKDIR /home/saluser/repos | ||
COPY dometrajectorymcs.py /home/saluser/scripts/ | ||
COPY atptgatmcsintegration.py /home/saluser/scripts/ | ||
WORKDIR /home/saluser |
Oops, something went wrong.