DE 

//Cloudogu EcoSystem Docs

Cloudogu logo

GitHub license GitHub release

Smeagol Dogu

https://cloudogu.com

This repository contains smeagol, an wiki server which stores its files in a git repository.

Development

Environment

Note: If you intend to use your local ecosystem, which will also reside on 192.168.56.2 by default, you have to set an etcd key first. This can be done in vagrant with the command etcdctl set /config/_global/stage "development" and restarting CAS in vagrant via docker restart cas.

Setting up a development ecosystem via groovy

Smeagol requires a proper configured Cloudogu EcoSystem in order to work properly. This can be achieved by using the provided groovy execution:

./mvnw groovy:execute@up

This command will clone the ecosystem repository into the .workspace folder, creates a setup.json with a proper configuration and starts the vm. After the vm has started, open the setup in your browser at http://192.168.56.2:8080, register the instance and finish the setup.

Then you can access SCM-Manager at: https://192.168.56.2/scm/.

Username: admin, Password: adminpw

With those credentials you can also enter the VM via SSH:

  • ssh admin@192.168.56.2
  • or cd .workspace/ecosystem; vagrant ssh

Hint: Make sure your SCM-Manager has the Smeagol Plugin installed!

To stop the vm use the down execution:

./mvnw groovy:execute@down

If the vm is not longer required, it can be removed with the destroy execution:

./mvnw groovy:execute@destroy

REST API

The server for the REST API can be started with the run goal of the spring-boot maven plugin:

./mvnw clean spring-boot:run

To access the development instance open http://192.168.56.1:8080 in your browser. For example, you can get all repositories from http://192.168.56.1:8080/smeagol/api/v1/repositories.

UI

Make sure your SCM-Manager has the Smeagol Plugin installed!

  • https://192.168.56.2/scm/admin/plugins/available/

If Smeagol runs on your local host and you use CAS and SCM-Manger inside a CES instance please make sure the SCM-Manager CAS setting accepts any proxy like so:

  • Administration -> Settings -> CAS -> Accept any proxy (enabled)

To start the UI development server, you should use yarn. First install the required dependencies:

yarn install

After the dependency installation has finished, start the development server:

yarn run start

After the RESTApi and the UI are successfully started, we can open Smeagol in our browser at http://192.168.56.1:8080. The spring-boot server from the RESTApi will proxy every ui request to the UI server.

Hot Reload

Hot reload should work out of the box for the ui.

To enable hot reload for java classes, the application must be started with the maven goal "spring-boot:run". For Intellij we have to recompile the project or enable "Make project automatically", but this requires some sort of hack. Please have a look at the description of the issue IDEA-141638.