Hi All, I cannot get Atlas module working in both demo application as well as in the standalone application. Any idea ?
Its been broken for a while now. The GSoC Project Atlas 3.1 that I’m currently working on aims to bring it back up.
If you’re trying to connect to a local instance of Atlas that you’re running, through the module, then you should probably look at AtlasConstants.java of openmrs-module-atlas .
@heliostrike Thanks for the information. I was looking at this feature https://issues.openmrs.org/browse/ATLAS-169 and was planning to start working on it. As per the current state of your project do you think i can setup a atlas server locally and connect the module with that ?
The module is broken, and won’t do much beyond displaying the screen (and making non-existent API calls), so you could just test in the web browser.
@heliostrike Thanks… i will try that and let you know
It has been broken for almost 2 years.
I think https://atlas.openmrs.org/ is already connected to the Atlas module as seen here. But the module’s functionality won’t be working (besides display the webpage on the canvas). We’re working on fixing it.
I’m assuming you want to work on ATLAS-169. To setup the environment, I followed these steps. This should start up the node server, and you can now build and test atlas from the browser. Burke described how he set it up using docker too.
I’d recomment you use atlas-stg.openmrs.org for any of your tests, and not use a local server.
@cintiadr Thanks. That would be great. Let me know if there is any other ticket that i can work to get atlas back to life
@cintiadr Were you able to check on this ?
Which actions are you waiting from me?
I’m not involved on GSoC, and I’m not following closely what’s being developed. Did you contacted Burke as I recommended?
- Clone this repo
- Within the
files/ldap-stgfolder, edit the
docker-compose.ymlfile to add the
openldapservice to the
openmrs-contrib-atlas_defaultnetwork by adding
to the end of the openldap service definition and putting
networks: - atlasnet
at the end of the file. You might have to bump the version (at the top of the file) from
networks: atlasnet: name: openmrs-contrib-atlas_default
3.5. This will make the
openldapservice run on the
openmrs-contrib-atlas_defaultnetwork (the default Docker uses for atlas development).
- Then you can run
docker-compose up -d openldapwithin the
files/ldap-stgfolder to bring up an openldap staging environment on atlas’ docker network.
- When you’re done, you can shut it down using
docker-compose downin the same folder.
With a staging version of
openldap running locally,
- I fork & clone the atlas repo
- Start up the database with
docker-compose up -d db
- And then run a copy of atlas. I’m use a Mac, but this should work on any *nix box (it would have to be adapted for Windoze)… I made a script like this that I call
nodeenvand make runnable in my path:
It creates a docker environment with node & nodemon and then runs it attached to the current directory. It’s handy for node development without having to install node, npm, etc. locally. With that script in place, I can work on atlas by running
#!/bin/bash if [[ "$(docker images -q nodeenv 2> /dev/null)" == "" ]]; then echo creating nodeenv image... docker run --name nodeenv -it node \ bash -c "npm install -g nodemon >/dev/null 2>&1" docker commit nodeenv nodeenv >/dev/null 2>&1 docker rm nodeenv >/dev/null 2>&1 fi docker run --rm -it "$@" -v $PWD:/app -w /app nodeenv bash
nodeenv --network openmrs-contrib-atlas_default -p 3000:3000
- Once in the atlas docker container, set up your environment by running
Note, you’ll have to apply for your own Google Maps API key and substitute it above.
export DB_HOST=db export DB_NAME=atlasdb export DB_USERNAME=atlas export DB_PASSWORD=iamatlas export LDAP_URI=ldap://openldap:389 export LDAP_USER=atlas export LDAP_PASSWORD=atlas export LDAP_USERS_GROUP=atlas-users export LDAP_ADMIN_GROUP=atlas-admin export MAIL_HOST=your.stmphost.here export MAIL_PORT=587 export MAIL_AUTH=true export MAIL_USERemail@example.com export MAIL_PASS=yoursmtppass export GOOGLE_MAPS_JS_API_KEY=your-google-maps-api-key
- Then start up atlas by running this command in the
/appfolder of the container:
- The atlas should be available on
http://localhost:3030/. You can make changes in the atlas code, nodemon will detect them, and automatically restart the server.
- When you’re done, you can shut down the database with
docker-compose down -v
Pulling openldap (osixia/openopenmrs-contrib-atlas_defaultldap:1.2.4)… The image for the service you’re trying to recreate has been removed. If you continue, volume data could be lost. Consider backing up your data before continuing.
Continue with the new image? [yN]y Pulling openldap (osixia/openopenmrs-contrib-atlas_defaultldap:1.2.4)… pull access denied for osixia/openopenmrs-contrib-atlas_defaultldap, repository does not exist or may require ‘docker login’
Your error message seems to reference something called “osixia/openopenmrs-contrib-atlas_defaultldap:1.2.4” as if the openmrs-contrib-atlas repo name was somehow forced into the middle (between “n” and “l”) of the reference for the osixia/openldap image.
It looks like your docker-compose.yml for ldap-stg is malformed.
@burke Thanks… You were right. I have accidentally modified the docker-compose.yml and its fixed now. Im on windows env so i will have to redo the nodeenv script for windows. Working on that now