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):
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:
sudo sh ./restart_dev_keepcore_datarestart.sh
To install test data in your development installation, use:
sudo sh ./inject_demo_data.sh
To clean your docker containers, including data (it will drop the database), use:
sudo sh ./clean_docker.sh
If you encounter a "
java.lang.OutOfMememoryError: PermGen space" error, add the option
-XX:+CMSClassUnloadingEnabledto 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 language groovy linenumbers true
sudo ufw allow from 172.17.0.1/27