Skip to content

azuneca/flexoffer_agent

 
 

Repository files navigation

FlexOffer Agent (FOA)

The FlexOffer Agent (FOA) is a is an extensible and highly customizable software component of the Flexibility Modeling, Management, and Trading System that is responsible for the generation and execution of FOs for one or multiple flexible loads (both production and consumption). It forms individual flexoffers, delivers the individual flexoffers to the aggregator software (FMAN), receives disaggregated schedules from the FMAN, and activates the flexible loads according to the received schedules. This open-source version of the FOA software was developed by researchers at the Daisy group, Department of Computer Science, Aalborg University, Denmark. Its performance has been successfully demonstrated in Cyprus, Germany, and Switzerland during the H2020 GOFLEX project (https://goflex-project.eu).

Installation using docker

It's very easy to setup and run the app with docker. All you need to do is build a docker image, then either run it in a container locally or push the image to a remote server and run it there. You must install docker and docker-compose both locally and on remote server if not installed already.

  • Install Docker on Ubuntu 16 or Ubuntu 18

  • Install Docker Compose

    sudo curl -L "https://github.com/docker/compose/releases/download/1.23.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
    sudo chmod +x /usr/local/bin/docker-compose
    docker-compose --version

Build Project

mvn clean install -DskipTests

Build docker image

docker-compose build

Push docker image to remote private docker registry

# one-time login to private docker registry
docker login repo.treescale.com # it will ask for username and password

docker-compose push

On remote server, pull and run docker image from private registry

# copy docker-compose.yml to remote server
scp docker-compose.yml <username>@<remote-server-address>:/remote/dir/path

# login to remote server and navigate to the directory containing docker-compose.yml
ssh <username>@<remote-server-address>
cd /remote/dir/path

# one-time login to private docker registry
docker login repo.treescale.com # you will need to install docker if not installed already
docker-compose pull # you will need to install docker-compose if not installed already

# launch a container (you must be inside the directory containing docker-compose.yml)
docker-compose -d up

Alternatively, you can perform one-time login to the private docker registry on the remote server as shown above, then directly deploy container from your local machine as follows:

# Note: you must be logged in to the private docker registry to run these commands
cat docker-compose | ssh <username>@<remote-server-address> "docker-compose -f - pull"
cat docker-compose | ssh <username>@<remote-server-address> "docker-compose -f - up -d"

Connect/Disconnect to/from a container

# attach to a running container
docker attach <container-name>

# detach from the running container
CTRL-p, CTRL-q

After the container is up and running, the services can be accessed on ports configured in docker-compose.yml

Redeployment after changing/updating code

When you make changes to your app code, remember to rebuild your image and recreate your app’s containers. To redeploy a service, use the following command the following commands. The first rebuilds the image for the service and then stop, destroy, and recreate just the web service. The --no-deps flag prevents docker-compose from also recreating any services which this service depends on.

docker-compose build --pull <service-name>
docker-compose up --no-deps -d <service-name>

Remove unnecessary docker images

# locally
docker system prune -f

# from remote server
ssh <username>@<remote-server-address> "docker system prune -f"

Acknowledgments

The project Generalized Operational FLEXibility for Integrating Renewables in the Distribution Grid (GOFLEX) has received funding from the European Union's Horizon 2020 research and innovation programme under grant agreement No 731232.

About

AAU GOFLEX Stack: Prosumer software / FlexOffer Agent

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 92.4%
  • JavaScript 5.2%
  • HTML 1.7%
  • CSS 0.4%
  • Shell 0.1%
  • Dockerfile 0.1%
  • TSQL 0.1%