Atlas module not working

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 of openmrs-module-atlas .

@heliostrike Thanks for the information. I was looking at this feature 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 ?

Yup :slight_smile:

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.

To set it up, you may want to check out the posts on the Atlas 3.1 Talk page from 63 to 66. I currently run the server using nodemon.

1 Like

@heliostrike Thanks… i will try that and let you know

1 Like

@heliostrike Do you think i can use the Atlas server in to connect the module ? If so can you send me the details of it ?

@dilantha as @heliostrike mentioned, the atlas module is currently broken, and he’s working to get atlas working again.

It has been broken for almost 2 years.

I think 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. :slight_smile:

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.

1 Like

@dilantha, I’d ask @burke’s opinion if it’s a good ticket for you. I don’t know how complex the ticket can become, and I don’t want you to spend time on something if you won’t be able to progress :slight_smile:

I’d recomment you use 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 :slight_smile:

1 Like

@cintiadr Were you able to check on this ?

Hi @dilantha,

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?

@dilantha, have you managed to get a development environment set up? I find it easiest to use Docker.

  • Clone this repo
  • Within the files/ldap-stg folder, edit the docker-compose.yml file to add the openldap service to the openmrs-contrib-atlas_default network by adding
          - atlasnet
    to the end of the openldap service definition and putting
        name: openmrs-contrib-atlas_default
    at the end of the file. You might have to bump the version (at the top of the file) from 3 to 3.5. This will make the openldap service run on the openmrs-contrib-atlas_default network (the default Docker uses for atlas development).
  • Then you can run docker-compose up -d openldap within the files/ldap-stg folder to bring up an openldap staging environment on atlas’ docker network.
  • When you’re done, you can shut it down using docker-compose down in 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 nodeenv and make runnable in my path:
    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
    docker run --rm -it "$@" -v $PWD:/app -w /app nodeenv bash
    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
    nodeenv --network openmrs-contrib-atlas_default -p 3000:3000
  • Once in the atlas docker container, set up your environment by running
    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_PORT=587
    export MAIL_AUTH=true
    export MAIL_PASS=yoursmtppass
    export GOOGLE_MAPS_JS_API_KEY=your-google-maps-api-key
    Note, you’ll have to apply for your own Google Maps API key and substitute it above.
  • Then start up atlas by running this command in the /app folder of the container:
    nodemon start
  • 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

@cintiadr Sorry i misunderstood your last reply. @burke Thanks a lot for the information. I will follow these steps

@burke @heliostrike Do i have do edit the docker image as well ? i could not find it in the docker hub. I get this error when try to docker-compose. I have done a docker login

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’

That’s a strange error message. The docker-compose.yml for ldap-stg loads the 1.2.4 tag of osixia/openldap from Docker Hub.

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