Bluesky services in docker containers, for use in Wright Group experimental orchestration.
This application uses the following ports:
port | protocol | content |
---|---|---|
27017 | mongo | databroker |
6379 | redis | re-manager redis |
5568 | zmq | re-manager events |
60615 | json/zmq | re-manager |
60625 | json/zmq | re-manager logs |
60620 | json/zmq | hwproxy |
$ apt install docker.io
$ apt install docker-compose
$ docker-compose up --build
Go to http://localhost:60610/docs to see queueserver api. Note: not active at this time.
git clone https://github.com/wright-group/bluesky-in-a-box
git clone https://github.com/wright-group/bluesky-cmds
(option gui)conda install happi
conda install yaqc-bluesky
conda install bluesky-queueserver
conda install bluesky-hwproxy
conda install bluesky-widgets
conda install yaqc-qtpy
conda install sympy
run wsl --install
run installer for docker desktop
reboot machine, ensure virtualization is enabled. This is sometimes called KVM, or Intel Virtualization Technology. It is often off by default, but is needed for wsl2/docker
I personally like to do wsl --install -d debian
but that is more of a preference than a requirement
Toggle settings for docker desktop:
Install bluesky-cmds python program (eventually will be conda/pip install)
bluesky-cmds edit-config
to populate the config file, default should be correctmkdir %LOCALAPPDATA%\happi\happi
echo [DEFAULT] > %LOCALAPPDATA%\happi\happi\happi.ini
echo path = %LOCALAPPDATA%\happi\happi\happidb.json >> %LOCALAPPDATA%\happi\happi\happi.ini
setx /s %COMPUTERNAME% /u %USERNAME% HAPPI_CFG %LOCALAPPDATA%\happi\happi\happi.ini
yaqd list --format happi | happi update -
~/bluesky-cmds-data
(Wherever you want data to go, should match WT5_DATA_PATH
below.env
for bluesky-in-a-box
copy .env-example .env
.env
HAPPI_DB_PATH=C:\Users\<USERNAME>\AppData\Local\happi\happi\happidb.json
WT5_DATA_PATH=C:\Users\<USERNAME>\bluesky-cmds-data
TZ=America/Chicago
(or whatever timezone you are in)docker compose up --build
docker compose build --no-cache
to force a full rebuild (should be rare)databroker.catalog_search_path
# ~/.local/share/intake/catalog.yml
sources:
mongo:
driver: bluesky-mongo-normalized-catalog
args:
metadatastore_db: mongodb://localhost:27017/metadatastore
asset_registry_db: mongodb://localhost:27017/asset_registry
docker-compose.yml
. If you want to use the slack app, continue with the following steps.oauth_config:
scopes:
bot:
- app_mentions:read
- channels:history
- groups:history
- mpim:history
- im:history
- chat:write
- files:write
- im:write
- commands
settings:
event_subscriptions:
bot_events:
- app_mention
- message.channels
- message.groups
- message.im
interactivity:
is_enabled: true
socket_mode_enabled: true
xapp-...
)xoxb-...
).env
:
SLACK_BOT_TOKEN = xoxb-...
SLACK_APP_TOKEN = xoxa-...
SLACK_CHANNEL = C1234567890