Skip to content
Alessandro Bellucci edited this page Jun 26, 2015 · 4 revisions

Server Installation

You can choose to install the Denv server as a Docker image or as a Java application running directly on your host.

Dockerized

Pull the image from the Docker Hub.

docker pull alebellu/denv

Make sure you have a MongoDB database you can use. For example you can use one from Docker Hub:

docker pull tutum/mongodb
docker run -d --restart=always --name denvd-db -p 27017:27017 -p 28017:28017 -e AUTH=no -v /home/user/data/mongodb:/data/db tutum/mongodb

And run the server (replace the ip address with the one of your Docker and MongoDB host):

docker run -d --restart=always --name denvd -e "DOCKER_HOST=172.17.42.1" -e "DOCKER_PORT=4243" -e "spring.data.mongodb.uri=mongodb://172.17.42.1/denv" -p 8090:8080 alebellu/denv /usr/bin/mvn exec:java

Non-Dockerized

Make sure Java and Maven (http://maven.apache.org/download.cgi) are available on the host, then:

mkdir denv && cd denv
wget https://raw.githubusercontent.com/ssouporg/denv/master/pom-standalone.xml -O pom.xml
mvn clean install

Make sure you have a MongoDB database you can use. And run the server (replace the ip/port with the one of your Docker and MongoDB hosts):

/usr/bin/mvn -D "DOCKER_HOST=172.17.42.1" -D "DOCKER_PORT=4243" -D "spring.data.mongodb.uri=mongodb://172.17.42.1/denv" exec:java

CLI Installation

You can choose to install the Denv Command Line Interface (CLI) as a Docker image or as a Java application running directly on your host and run it via Nailgun or directly.

Via Nailgun (Fastest)

Run the Nailgun server:

sudo docker run -d --restart=always --name denv-ngd -e "DOCKERIZED_DENV_CLI=true" -e "DENV_SERVER_URL=http://172.17.42.1:8090" -v /:/dockerHost -v $(pwd):/dockerHostPwd -p 2113:2113 alebellu/denv /bin/bash /usr/bin/denv-ngd

Install Nailgun:

[unix] wget https://raw.githubusercontent.com/ssouporg/denv/master/ng -O /usr/bin/ng
[wind] wget https://raw.githubusercontent.com/ssouporg/denv/master/ng.exe -O ng.exe

Run a command via Nailgun:

alias denv='/usr/bin/ng --nailgun-port 2113 org.ssoup.denv.cli.Main'
denv envs

Dockerized

Pull the image from the Docker Hub.

docker pull alebellu/denv

And run the cli (replace the ip/port with those of your Denv server):

docker run -e "DOCKERIZED_DENV_CLI=true" -e "DENV_SERVER_URL=http://172.17.42.1:8090" -v /:/dockerHost -v $(pwd):/dockerHostPwd alebellu/denv /bin/bash /usr/bin/denv envs

For a more convenient short command (replace the ip/port with those of your Denv server):

alias denv='docker run --rm -e "DOCKERIZED_DENV_CLI=true" -e "DENV_SERVER_URL=http://172.17.42.1:8090" -v /:/dockerHost -v $(pwd):/dockerHostPwd alebellu/denv /bin/bash /usr/bin/denv'
denv envs

Non-Dockerized

Make sure Java and Maven (http://maven.apache.org/download.cgi) are available on the host, then:

mkdir denv && cd denv
wget https://raw.githubusercontent.com/ssouporg/denv/master/pom-cli.xml -O pom-cli.xml
mvn clean install

Make sure you have a MongoDB database you can use.

Run a CLI command (replace the ip/port with those of your Denv server):

  • via Java (faster):

      /usr/bin/mvn dependency:build-classpath -Dmdep.outputFile=cp.txt
      alias denv=java -cp `cat cp.txt` -D "DENV_SERVER_URL=http://172.17.42.1:8090" org.ssoup.denv.cli.Main
      denv envs
    
  • or via Maven:

      wget https://raw.githubusercontent.com/ssouporg/denv/master/pom-cli.xml -O pom-cli.xml
      /usr/bin/mvn -q -f pom-cli.xml -D "DENV_SERVER_URL=http://172.17.42.1:8090" exec:java -Dexec.args="envs"
    

Clone this wiki locally