Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

In order to do this and to avoid installation of an additional local machine, we will setup a Dockerized development environment. Follow the step 2 "Install Docker" and step 3 and 3.1 "Configure Cytomine Installation" from Automatic Installation with Docker.

In addition, into your configuration.sh, change

...

In Cytomine-boostrap directory, you can now run the script that will generate the development environment installation file and deploy the Docker containers (except Core and/or IMS that you will run locally):

Code Block
sudo bash init.sh
./restart_sudo bash dev_keepcore_datastart_deploy.sh sh

If DEV_CORE=true, in IntelliJ, you can now run the Cytomine-core project that will simulate a server at the grails.serverURL mentionned above. You can now access the core development server at http://CORE_URL:8080 to test your core dev environment. It will rely on other containers installed by Docker but use your own core development environment.

The first time, it will create some user accounts and an admin account (username: admin, password: admin).

If DEV_IMS=true, in IntelliJ, you can now run the Cytomine-IMS project that will simulate the IMS server mentionned above. You can now access the IMS development server at http://IMS_URL to test your IMS dev environment. It will rely on other containers installed by Docker but use your own IMS development environment.

Obvisouly, you can combine DEV_CORE=true and DEV_IMS=true to work on booth servers at the same time.

 

To restart the docker containers while keeping data, use the same script:

Code Block
languagebash
linenumberstrue
sudo sh ./restart_dev_keepcore_datarestart.sh

 

To install test data in your development installation, use:

Code Block
languagebash
linenumberstrue
sudo sh ./inject_demo_data.sh

 

To clean your docker containers, including data (it will drop the database), use:

Code Block
languagebash
linenumberstrue
sudo sh ./clean_docker.sh

 

 

Troubleshooting

  • If you encounter a "java.lang.OutOfMememoryError: PermGen space" error, add the option -XX:+CMSClassUnloadingEnabled to the JVM, when running Cytomine-Core. In Intellij, go to Run > Edit Configurations and add it in the VM options field.

  • As nginx will try to contact your machine, you may need to allow docker containers to contact port 8080 & 9080. Here is the command with UFW

    Code Block
    languagegroovy
    linenumberstrue
    sudo ufw allow from 172.17.0.1/27