Git Product home page Git Product logo

docker-wirecloud's Introduction

Supported tags and respective Dockerfile links

What is WireCloud?

Support badge

WireCloud builds on cutting-edge end-user development, RIA and semantic technologies to offer a next-generation end-user centred web application mashup platform aimed at leveraging the long tail of the Internet of Services. WireCloud builds on cutting-edge end-user (software) development, RIA and semantic technologies to offer a next-generation end-user centred web application mashup platform aimed at allowing end users without programming skills to easily create web applications and dashboards/cockpits (e.g. to visualize their data of interest or to control their domotized home or environment). Web application mashups integrate heterogeneous data, application logic, and UI components (widgets) sourced from the Web to create new coherent and value-adding composite applications. They are targeted at leveraging the "long tail" of the Web of Services (a.k.a. the Programmable Web) by exploiting rapid development, DIY, and shareability. They typically serve a specific situational (i.e. immediate, short-lived, customized) need, frequently with high potential for reuse. Is this "situational" character which precludes them to be offered as 'off-the-shelf' functionality by solution providers, and therefore creates the need for a tool like WireCloud

WireCloud is part of FIWARE. Check it out in the Catalogue

WireCloud's logo

How to use this image

$ docker run --name some-wirecloud -p 80:8000 -e DEBUG=True -d fiware/wirecloud

The following environment variables are also honored for configuring your WireCloud instance:

  • -e DEBUG=... (defaults to "False", use "True" for running WireCloud in debug mode. Debug mode should be enabled for running WireCloud in standalone mode)
  • -e LOGLEVEL=... (defaults to "INFO")
  • -e ALLOWED_HOSTS=... (defaults to "*", whitespace whitespace-separated list of allowed hosts. See Django documentation for more details)
  • -e DEFAULT_LANGUAGE=... (defaults to "browser", see documentation for more details)
  • -e DEFAULT_THEME=... (defaults to "wirecloud.defaulttheme")
  • -e DB_HOST=... (defaults to nothing, provide a host value to connect this image with a DB server)
  • -e DB_NAME=... (defaults to "postgres")
  • -e DB_USERNAME=... (defaults to "postgres")
  • -e DB_PASSWORD=... (defaults to "postgres")
  • -e DB_PORT=... (defaults to "5432")
  • -e FORWARDED_ALLOW_IPS=... (defaults to "*", set this to provide a list of trusted reverse proxies)
  • -e ELASTICSEARCH2_URL=... (defaults to nothing, leave it empty to use Whoosh instead).
  • -e LANGUAGE_CODE=... (defaults to "en-gb", See django documentation for more details)
  • -e MEMCACHED_LOCATION=... (defaults to nothing, leave it empty to disable memcached support)
  • -e FIWARE_IDM_SERVER=... (defaults to nothing, leave it empty for authenticating users using the credentials stored on the WireCloud database.)
  • -e FIWARE_IDM_PUBLIC_URL=... (defaults to nothing, leave it empty for using the FIWARE_IDM_SERVER configuration for building the url when redirecting the browser to the IdM portal)
  • -e SOCIAL_AUTH_FIWARE_KEY=... (defaults to nothing)
  • -e SOCIAL_AUTH_FIWARE_SECRET=... (defaults to nothing)
  • -e KEYCLOAK_IDM_SERVER=... (defaults to nothing, leave it empty for authenticating users using the credentials stored on the WireCloud database.)
  • -e KEYCLOAK_REALM=... (default to nothing, realm to use for connecting with keycloak)
  • -e KEYCLOAK_KEY=... (default to nothing)
  • -e KEYCLOAK_GLOBAL_ROLE=... (default to "False")
  • -e SOCIAL_AUTH_KEYCLOAK_KEY=... (defaults to nothing)
  • -e SOCIAL_AUTH_KEYCLOAK_SECRET=... (defaults to nothing)
  • -e HTTPS_VERIFY=... (True, False or path to a certificate bundle, default to "/etc/ssl/certs/ca-certificates.crt")
  • -e ADMIN_URL_PATH=... (default to "^admin/", regexp for the administration path)

In addition to those environment variables, this docker image also allows you to configure the following Django settings using environment variables with the same name: CACHE_MIDDLEWARE_KEY_PREFIX, CSRF_COOKIE_AGE, CSRF_COOKIE_HTTPONLY, CSRF_COOKIE_NAME, CSRF_COOKIE_SECURE, DEFAULT_FROM_EMAIL, EMAIL_HOST, EMAIL_HOST_PASSWORD, EMAIL_PORT, EMAIL_HOST_USER, EMAIL_USE_SSL, EMAIL_USE_TLS, FORCE_SCRIPT_NAME, LOGOUT_REDIRECT_URL, SECRET_KEY, SESSION_COOKIE_AGE, SESSION_COOKIE_NAME, SESSION_COOKIE_HTTPONLY and SESSION_COOKIE_SECURE. See Django documentation for more details.

When running WireCloud with TLS behind a reverse proxy such as Apache/NGINX which is responsible for doing TLS termination, be sure to set the X-Forwarded-Proto, X-Forwarded-Host and X-Forwarded-Port headers appropriately.

Docker Secrets

As an alternative to passing sensitive information via environment variables, _FILE may be appended to some sensitive environment variables, causing the initialization script to load the values for those variables from files present in the container. In particular, this can be used to load passwords from Docker secrets stored in /run/secrets/<secret_name> files. For example:

docker run --name wirecloud -e DB_PASSWORD_FILE=/run/secrets/password -d fiware/wirecloud

Currently, this _FILE suffix is supported for:

  • EMAIL_HOST_PASSWORD
  • KEYCLOAK_KEY
  • LOGOUT_REDIRECT_URL
  • SECRET_KEY
  • SOCIAL_AUTH_FIWARE_KEY
  • SOCIAL_AUTH_FIWARE_SECRET
  • SOCIAL_AUTH_KEYCLOAK_KEY
  • SOCIAL_AUTH_KEYCLOAK_SECRET

Running manage.py commands

You can run any available manage.py command by using docker exec -ti some-wirecloud manage.py .... For example, you can create superusers/administrators by running the following command:

$ docker exec -ti some-wirecloud manage.py createsuperuser
Username (leave blank to use 'root'): admin
Email address: ${youremail}
Password: ${yourpassword}
Password (again): ${yourpassword}
Superuser created successfully.

Regarding commands using the filesystem, take into account that those commands will be executed inside the container and thus the filesystem will be the one used by the container. The manage.py script will not check if those commands make changes outside the provided volumes. Anyway, they can be used without any problem. For example, static files can be collected using the following command:

$ docker exec -ti some-wirecloud manage.py collectstatic

Use docker exec -ti some-wirecloud manage.py --help for getting the list of available commands.

... via docker stack deploy or docker-compose

Example docker-compose.yml for WireCloud:

version: "3"

services:

    nginx:
        restart: always
        image: nginx
        ports:
            - 80:80
        volumes:
            - ./nginx.conf:/etc/nginx/nginx.conf:ro
            - ./wirecloud-static:/var/www/static:ro
        depends_on:
            - wirecloud


    postgres:
        restart: always
        image: postgres
        environment:
            - POSTGRES_PASSWORD=wirepass   # Change this password!
        volumes:
            - ./postgres-data:/var/lib/postgresql/data


    elasticsearch:
        restart: always
        image: elasticsearch:2.4
        volumes:
            - ./elasticsearch-data:/usr/share/elasticsearch/data
        command: elasticsearch -Des.index.max_result_window=50000


    memcached:
        restart: always
        image: memcached:1
        command: memcached -m 2048m


    wirecloud:
        restart: always
        image: fiware/wirecloud
        depends_on:
            - postgres
            - elasticsearch
            - memcached
        environment:
            - DEBUG=False
            # - DEFAULT_THEME=wirecloud.defaulttheme
            - DB_HOST=postgres
            - DB_PASSWORD=wirepass   # Change this password!
            - FORWARDED_ALLOW_IPS=*
            - ELASTICSEARCH2_URL=http://elasticsearch:9200/
            - MEMCACHED_LOCATION=memcached:11211
            # Uncomment the following environment variables to enable IDM integration
            #- FIWARE_IDM_SERVER=${FIWARE_IDM_SERVER}
            #- SOCIAL_AUTH_FIWARE_KEY=${SOCIAL_AUTH_FIWARE_KEY}
            #- SOCIAL_AUTH_FIWARE_SECRET=${SOCIAL_AUTH_FIWARE_SECRET}
        volumes:
            - ./wirecloud-data:/opt/wirecloud_instance/data
            - ./wirecloud-static:/var/www/static

This docker-compose.yml file relies on a nginx.conf configuration file:

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    server {

        listen 80;
        server_name example.org;
        client_max_body_size 20M;
        charset utf-8;

        location /static {
            alias /var/www/static;
        }

        location / {
            proxy_pass http://wirecloud:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

    }
}

Run docker stack deploy -c docker-compose.yml wirecloud (or docker-compose -f docker-compose.yml up), wait for it to initialize completely, and visit http://swarm-ip, http://localhost, or http://host-ip (as appropriate). Also, take into account that you should configure https to have a production-ready deployment of WireCloud (not covered by this example).

Customizations

If you want to customize your WireCloud installation, the best option is to create a new docker image by extending one of the official images and installing new modules. For example, you can follow the following tutorial for creating a custom theme and install it on the extended image and use the DEFAULT_THEME environment variable to configure it as the default theme.

License

View license information for WireCloud.

Supported Docker versions

This image is officially supported on Docker version 1.7.0.

Support for older versions (down to 1.0) is provided on a best-effort basis.

User Feedback

Documentation

This document should provide everything you need to install WireCloud using docker. Anyway, you can find the User & Programmer's Manual and the Administration Guides on Read the Docs.

Issues

If you have any problems with or questions about this image, please contact us through a GitHub issue.

You can also reach many of the official image maintainers via the fiware and fiware-wirecloud tags on StackOverflow.

Contributing

You are invited to contribute new features, fixes, or updates, large or small; we are always thrilled to receive pull requests, and do our best to process them as fast as we can.

Before you start to code, we recommend discussing your plans through a GitHub issue, especially for more ambitious contributions. This gives other contributors a chance to point you in the right direction, give you feedback on your design, and help you find out if someone else is working on the same thing.

docker-wirecloud's People

Contributors

aarranz avatar fdelavega avatar fisuda avatar flopezag avatar jason-fox avatar rockneurotiko avatar samgh96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-wirecloud's Issues

502 Bad Gateway nginx/1.15.8

Want to work with Wirecloud, unfortunately, nginx failed to load, with following error:
502 Bad Gateway nginx/1.15.8

I can confirm nginx, wirecloud and postgres all running:

$ docker container ls
CONTAINER ID        IMAGE                                   COMMAND                  CREATED             STATUS              PORTS                                                      NAMES
190b97ea946b        nginx                                   "nginx -g 'daemon of…"   10 minutes ago      Up 10 minutes       0.0.0.0:80->80/tcp                                         fiware-nginx
200859165ab6        fiware/wirecloud                        "/docker-entrypoint.…"   10 minutes ago      Up 10 minutes       8000/tcp                                                   fiware-wirecloud
6f7b5c7705ca        postgres:latest                         "docker-entrypoint.s…"   10 minutes ago      Up 10 minutes       0.0.0.0:5432->5432/tcp                                     fiware-postgres
c8f0d820fec9        elasticsearch:2.4                       "/docker-entrypoint.…"   10 minutes ago      Up 10 minutes       9200/tcp, 9300/tcp                                         fiware-elasticsearch
79be28950329        memcached:1                             "docker-entrypoint.s…"   10 minutes ago      Up 10 minutes       11211/tcp                                                  fiware-memcached

Docker compose:

version: "3.1"

services:

  mongo:
    image: mongo:3.6
    hostname: mongo
    container_name: fiware-mongo
    ports:
      - "27017:27017"
    networks:
      - default
    command: --smallfiles
  orion:
    image: fiware/orion
    hostname: orion
    container_name: fiware-orion
    depends_on:
      - mongo
    networks:
      - default
    ports:
      - "1026:1026"
    expose:
      - "1026"
    command: -dbhost mongo -logLevel DEBUG
  lightweightm2m-iotagent:
    image: telefonicaiot/lightweightm2m-iotagent
    hostname: idas
    container_name: fiware-iotagent
    depends_on:
      - mongo
    networks:
      - default
    ports:
      - "4041:4041"
      - "5684:5684/udp"
    expose:
      - "4041"
      - "5684"
    environment:
      - "IOTA_CB_HOST=orion"
      - "IOTA_CB_PORT=1026"
      - "IOTA_NORTH_PORT=4041"
      - "IOTA_REGISTRY_TYPE=mongodb"
      - "IOTA_LOG_LEVEL=DEBUG"
      - "IOTA_TIMESTAMP=true"
      - "IOTA_MONGO_HOST=mongo"
      - "IOTA_MONGO_PORT=27017"
      - "IOTA_MONGO_DB=lwm2miotagent"
      - "IOTA_HTTP_PORT=5684"
      - "IOTA_PROVIDER_URL=http://lightweightm2m-iotagent:4041"
  cygnus:
    image: fiware/cygnus-ngsi:latest
    hostname: cygnus
    container_name: fiware-cygnus
    depends_on:
      - mongo
    networks:
      - default
    expose:
      - "5080"
    ports:
      - "5050:5050"
      - "5080:5080"
    environment:
      - "CYGNUS_MONGO_HOSTS=mongo:27017"
      - "CGYNUS_LOG_LEVEL_=DEBUG"
      - "CYGNUS_SERVICE_PORT=5050"
      - "CYGNUS_API_PORT=5080"
  nginx:
    restart: always
    image: nginx
    container_name: fiware-nginx
    ports:
      - 80:80
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./wirecloud-static:/var/www/static:ro
    depends_on:
      - wirecloud
  postgres:
    restart: always
    image: postgres:latest
    container_name: fiware-postgres
    ports:
      - "5432:5432"
    expose:
      - "5432"
    environment:
      - POSTGRES_PASSWORD=postgres
    volumes:
      - ./postgres-data:/var/lib/postgresql/data
  elasticsearch:
    restart: always
    image: elasticsearch:2.4
    container_name: fiware-elasticsearch
    volumes:
      - ./elasticsearch-data:/usr/share/elasticsearch/data
    command: elasticsearch -Des.index.max_result_window=50000
  memcached:
    restart: always
    image: memcached:1
    container_name: fiware-memcached
    command: memcached -m 2048m
  wirecloud:
    restart: always
    container_name: fiware-wirecloud
    image: fiware/wirecloud
    depends_on:
      - postgres
      - elasticsearch
      - memcached
    environment:
      - DEBUG=False
    # - DEFAULT_THEME=wirecloud.defaulttheme
      - DB_HOST=postgres
      - DB_PASSWORD=postgres   
      - FORWARDED_ALLOW_IPS=*
      - ELASTICSEARCH2_URL=http://elasticsearch:9200/
      - MEMCACHED_LOCATION=memcached:11211
     # Uncomment the following environment variables to enable IDM integration
     #- FIWARE_IDM_SERVER=${FIWARE_IDM_SERVER}
     #- SOCIAL_AUTH_FIWARE_KEY=${SOCIAL_AUTH_FIWARE_KEY}
     #- SOCIAL_AUTH_FIWARE_SECRET=${SOCIAL_AUTH_FIWARE_SECRET}
    volumes:
      - ./wirecloud-data:/opt/wirecloud_instance/data
      - ./wirecloud-static:/var/www/static
```
`nginx.conf` file:
```
user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    worker_connections  1024;
}


http {
    include       /etc/nginx/mime.types;
    default_type  application/octet-stream;

    log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent" "$http_x_forwarded_for"';

    access_log  /var/log/nginx/access.log  main;

    sendfile        on;
    #tcp_nopush     on;

    keepalive_timeout  65;

    #gzip  on;

    server {

        listen 80;
        server_name example.org;
        client_max_body_size 20M;
        charset utf-8;

        location /static {
            alias /var/www/static;
        }

        location / {
            proxy_pass http://wirecloud:8000;
            proxy_set_header Host $host;
            proxy_set_header X-Real-IP $remote_addr;
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        }

    }
}
```

Mitigate file permissions problems on volumes

Docker already provides isolation, so running wirecloud inside docker images using a wirecloud user does not make sense. Moreover, it is a source of problems due file permissions (usually on volumes).

HTTPError at /complete/fiware/

Hello,
I'm running dockerized images of wirecloud+nginx and keyrock (with OAuth2) and I'm having some issues probably related to gunicorn running in the wirecloud image.
Here's below the stack trace:

Environment:

Request Method: GET
Request URL: http://192.168.5.205/complete/fiware/?code=787979c8344a72a03386f1a4863e8c1a82f2851f&state=AIx9Oo103l7biQT8XOzCqNg0A0XkUrH0

Django Version: 1.11.18
Python Version: 3.6.8
Installed Applications:
('django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'django.contrib.admin',
'wirecloud.commons',
'compressor',
'wirecloud.catalogue',
'wirecloud.platform',
'wirecloud.fiware',
'social_django',
'haystack',
'wirecloud_pubsub')
Installed Middleware:
('wirecloud.commons.middleware.URLMiddleware',)

Traceback:

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py" in inner
41. response = get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _legacy_get_response
249. response = self._get_response(request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
187. response = self.process_exception_by_middleware(e, request)

File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py" in _get_response
185. response = wrapped_callback(request, *callback_args, **callback_kwargs)

File "/usr/local/lib/python3.6/site-packages/django/views/decorators/cache.py" in _wrapped_view_func
57. response = view_func(request, *args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/django/views/decorators/csrf.py" in wrapped_view
58. return view_func(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/social_django/utils.py" in wrapper
49. return func(request, backend, *args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/social_django/views.py" in complete
33. *args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/social_core/actions.py" in do_complete
43. user = backend.complete(user=user, *args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/social_core/backends/base.py" in complete
40. return self.auth_complete(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/social_core/utils.py" in wrapper
259. return func(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/social_core/backends/oauth.py" in auth_complete
401. method=self.ACCESS_TOKEN_METHOD

File "/usr/local/lib/python3.6/site-packages/social_core/backends/oauth.py" in request_access_token
373. return self.get_json(*args, **kwargs)

File "/usr/local/lib/python3.6/site-packages/social_core/backends/base.py" in get_json
238. return self.request(url, *args, **kwargs).json()

File "/usr/local/lib/python3.6/site-packages/social_core/backends/base.py" in request
234. response.raise_for_status()

File "/usr/local/lib/python3.6/site-packages/requests/models.py" in raise_for_status
940. raise HTTPError(http_error_msg, response=self)

Exception Type: HTTPError at /complete/fiware/
Exception Value: 500 Server Error: Internal Server Error for url: http://192.168.5.205:3005/oauth2/token

I have all the cookies:

Variable Value
_csrf 'WVJw39Q6x_KHtv9xCdAlhJTe'
csrftoken 'c2ehey0WSYQQBGhsrDw2Cb84rjMEvYsiKgyewMfLH7oYGKfGF8HQGnVWeJWolNtx'
connect.sid 's%3A0voE9jUAO_AT8Wy3cj8hTpkMtj3qpn0K.9NqHXYtRyl%2FXC72KW91hS2M254%2FLuxNipGU7fwn8xC0'
sessionid 'vovvszqd3abrq0x07rqv42uahp6wp3df'
io 'CXqIpDUX8MD5KBOMAAAB'
wcsessionid 'to0chnkz1qgubv2uga7csiz230jbqu6j'
session 'eyJyZWRpciI6Ii8iLCJ1c2VyIjp7ImlkIjoiYWFhYWFhYWEtZ29vZC0wMDAwLTAwMDAtMDAwMDAwMDAwMDAwIiwidXNlcm5hbWUiOiJhbGljZSIsImVtYWlsIjoiYWxpY2UtdGhlLWFkbWluQHRlc3QuY29tIiwiaW1hZ2UiOiIvaW1nL2xvZ29zL3NtYWxsL3VzZXIucG5nIn19'
session.sig '0tKZ56-hzAlYR4mHNIHO7jLqzwE'

The only clear error appearing in the info is below:

SERVER_SOFTWARE 'gunicorn/19.3.0'
gunicorn.socket <socket.socket fd=10, family=AddressFamily.AF_INET, type=SocketKind.SOCK_STREAM, proto=0, laddr=('172.18.1.11', 8000), raddr=('172.18.1.15', 38980)>
wsgi.errors <gunicorn.http.wsgi.WSGIErrorsWrapper object at 0x7f02b2922e10>
wsgi.file_wrapper ''
wsgi.input <gunicorn.http.body.Body object at 0x7f02b2922a58>
wsgi.multiprocess True
wsgi.multithread False
wsgi.run_once False
wsgi.url_scheme 'http'
wsgi.version (1, 0)

where 172.18.1.11 is internal IP address of wirecloud and 172.18.1.15 is internal IP address of nginx.

Any idea?

Thanks

Make composable images wait until database server is running

Currently, composable images are not waiting until the db server is up. This is not giving too much problems because the database is populated manually by running a docker exec command.

But, once #4 is ready, the docker-entrypoint.sh script will create the initial configuration and populate the database, making this a required step.

wirecloud deployment in subdirectory - Docker (nginx, wirecloud)

Hi, everybody,

I'm trying to deploy wirecloud in a subdirectory so that the url looks like this:

http://mydomain.com/wirecloud/

The problems I have are the following:

  1. Wirecloud serves static content in the '/static' subdirectory:

  2. Wirecloud consumes services through the use of APIs in the /api url

From Nginx I can't find a way to send the queries through a subdirectory, because when I ask for some static element, wirecloud does the query in http://mydomain.com/static not in http://mydomain.com/wirecloud/static . The same applies to the APIs http://mydomain.com/api , not http://mydomain.com/wirecloud/api

Is there currently a way to do this?

Thanks!

[MUST] Dockerization must protect Username/Password ENV

With the addition of Oauth2 support authentication with using FIWARE Keyrock, usernames and passwords are now part of the Docker environment variables. Currently these can only be passed using plain text. The addition of Docker Secrets support protecting these passwords is necessary to plug a potential security flaw.

This is a simple addition of a script in the same manner as PostGres (and relevant documentation of course) Cygnus and most of the IoT Agents does it already.

telefonicaid/iotagent-node-lib#726 (comment)

Within the Docker container, Passwords etc can only be passed protected by Docker Secrets

  • MUST requirement from TSC

Wirecloud 1.3 simple returns 403 on all WireCloud's proxy requests

After logging in with superuser and adding NGSI browser widget it shows message:

ConnectionError: You aren't allowed to use the WireCloud's proxy. Have you signed off from WireCloud?

Chrome debug console says:

GET http://iotcloud:1080/cdp/http/iotcloud/orion/v2/entities?limit=20&offset=0&options=count%2CkeyValues&idPattern=.* 403 (Forbidden)

The only change in setup is listen nginx on port 1080 and settings.py was mounted with FORCE_DOMAIN and FORCE_PORT set to proper values.

Wirecloud Mashup: Error creating subscription in the context broker server: Connection Error

I am creating a wirecloud mashup using my own deployed Orion CB instance. On the wiring, I added an NGSI Source and an NGSI Entity to PoI.

In the NGSI Source settings I added the following configurations:

NGSI Source: http://193.136.xx.xx:1026/
NGSI Entity to PoI: https://ngsiproxy.lab.fiware.org
Use the FIWARE credentials of the user: Unchecked
Use the FIWARE credentials of the workspace owner: Unchecked
FIWARE-Service: environment
FIWARE-ServicePath: /basic
NGSI entity types: WeatherObserved, AirQualityObserved, NoiseLevelObserved
Id pattern: Empty
Monitored NGSI Attributes: location, temperature, relativeHumidity, illuminance, name, measurand, sonometerClass, particles, O3

NB: my orion CB in hosted on server IP 193.136.xx.xx Fiware-service, servicepath, entities and attributes are all defined and available with the Orion CB.

However, I keep receiving the following error in the NGSI Source logs.
a few seconds ago Error creating subscription in the context broker server: Connection Error
What is the problem here?

Bind Iot-agent Json with orion and wirecloud

I want to route my mqtt traffic from IOT Agent Json to wirecloud. From orion I can visualize the data to grafana as well. But in wirecloud, only the entitties that are created manualy in orion are visible, while all subscribed and registered-context entities have no output/traffic in wirecloud.

Error occurs when building WireCloud 1.3 docker images

Hi @aarranz,

A build error occurs in step 12/19 of Dockerfile for WireCloud 1.3.
It seems that this is because Django/channels 2.4.0 dropped support for Django < 2.2.

Step 12/19 : RUN adduser --system --group --shell /bin/bash wirecloud &&     pip install --no-cache-dir channels asgi_ipc asgi_redis asgi_rabbitmq wirecloud_keycloak &&     mkdir -p /opt/wirecloud_instance /var/www/static &&     cd /opt &&     wirecloud-admin startproject wirecloud_instance wirecloud_instance &&     chown -R wirecloud:wirecloud wirecloud_instance /var/www/static &&     chmod a+x wirecloud_instance/manage.py
 ---> Running in b0c6fa0417b4
Adding system user `wirecloud' (UID 101) ...
Adding new group `wirecloud' (GID 102) ...
Adding new user `wirecloud' (UID 101) with group `wirecloud' ...
Creating home directory `/home/wirecloud' ...
Collecting channels
  Downloading https://files.pythonhosted.org/packages/46/9e/289f34f101029c3c7aa4c90cfcc9fedf0a631880d4b3e47d994666ccf18c/channels-2.4.0-py2.py3-none-any.whl
Collecting asgi_ipc
  Downloading https://files.pythonhosted.org/packages/4c/da/f8356f2f2c7898c532a3d06638171183c3dbd401cff77eccb15985ed1a99/asgi_ipc-1.4.2-py2.py3-none-any.whl
Collecting asgi_redis
  Downloading https://files.pythonhosted.org/packages/63/c0/4a2d24cbc0d163ae02bb21eaa1d95311e3948a4fd532e2d6416a02e16471/asgi_redis-1.4.3-py2.py3-none-any.whl
Collecting asgi_rabbitmq
  Downloading https://files.pythonhosted.org/packages/6a/13/f00e11881657bb9157c102fbf70502c7e5df16b2edc158a1c2d8a755614f/asgi_rabbitmq-0.5.5-py3-none-any.whl
Collecting wirecloud_keycloak
  Downloading https://files.pythonhosted.org/packages/c5/52/7d58d398e43d955be5807f24147c15f40953ad30d68a668dc38b25044141/wirecloud_keycloak-0.2.3-py3-none-any.whl
Collecting Django>=2.2 (from channels)
  Downloading https://files.pythonhosted.org/packages/55/d1/8ade70e65fa157e1903fe4078305ca53b6819ab212d9fbbe5755afc8ea2e/Django-3.0.2-py3-none-any.whl (7.4MB)
Collecting asgiref~=3.2 (from channels)
  Downloading https://files.pythonhosted.org/packages/a5/cb/5a235b605a9753ebcb2730c75e610fb51c8cab3f01230080a8229fa36adb/asgiref-3.2.3-py2.py3-none-any.whl
Collecting daphne~=2.3 (from channels)
  Downloading https://files.pythonhosted.org/packages/3c/f6/2b5282e477379a106e095ca809b1e05a5581d3ee9d617b681714ae9ad294/daphne-2.4.1-py2.py3-none-any.whl
Collecting posix-ipc>=1.0.0 (from asgi_ipc)
  Downloading https://files.pythonhosted.org/packages/c9/3e/54217da71aa26b488295d878df4d3132093253b4ae5798ac66fcb6921ef0/posix_ipc-1.0.4.tar.gz (78kB)
Collecting msgpack-python (from asgi_ipc)
  Downloading https://files.pythonhosted.org/packages/8a/20/6eca772d1a5830336f84aca1d8198e5a3f4715cd1c7fc36d3cc7f7185091/msgpack-python-0.5.6.tar.gz (138kB)
Requirement already satisfied: six in /usr/local/lib/python3.6/site-packages (from asgi_ipc) (1.13.0)
Collecting redis~=2.10.6 (from asgi_redis)
  Downloading https://files.pythonhosted.org/packages/3b/f6/7a76333cf0b9251ecf49efff635015171843d9b977e4ffcf59f9c4428052/redis-2.10.6-py2.py3-none-any.whl (64kB)
Collecting pika~=0.11.0 (from asgi_rabbitmq)
  Downloading https://files.pythonhosted.org/packages/76/b4/0ada6918ac79ce4d8d45d0ba436ee21a1ef685047fb1dde4d2de0178b327/pika-0.11.2-py2.py3-none-any.whl (107kB)
Collecting cached-property (from asgi_rabbitmq)
  Downloading https://files.pythonhosted.org/packages/3b/86/85c1be2e8db9e13ef9a350aecd6dea292bd612fa288c2f40d035bb750ded/cached_property-1.5.1-py2.py3-none-any.whl
Requirement already satisfied: pyJwt>=1.7.1 in /usr/local/lib/python3.6/site-packages (from wirecloud_keycloak) (1.7.1)
Collecting cryptography>=2.6.1 (from wirecloud_keycloak)
  Downloading https://files.pythonhosted.org/packages/ca/9a/7cece52c46546e214e10811b36b2da52ce1ea7fa203203a629b8dfadad53/cryptography-2.8-cp34-abi3-manylinux2010_x86_64.whl (2.3MB)
Requirement already satisfied: wirecloud>=1.2.0 in /usr/local/lib/python3.6/site-packages (from wirecloud_keycloak) (1.3.1)
Requirement already satisfied: pytz in /usr/local/lib/python3.6/site-packages (from Django>=2.2->channels) (2019.3)
Collecting sqlparse>=0.2.2 (from Django>=2.2->channels)
  Downloading https://files.pythonhosted.org/packages/ef/53/900f7d2a54557c6a37886585a91336520e5539e3ae2423ff1102daf4f3a7/sqlparse-0.3.0-py2.py3-none-any.whl
Collecting autobahn>=0.18 (from daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/b4/db/f9762ed48eeae8ca2c30c9313b8f0fc05843925ddf578db89bb67c9e1f44/autobahn-20.1.2-py2.py3-none-any.whl (767kB)
Collecting twisted[tls]>=18.7 (from daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/88/e2/0c21fadf0dff02d145db02f24a6ed2c24993e7242d138babbca41de2f5a2/Twisted-19.10.0-cp36-cp36m-manylinux1_x86_64.whl (3.1MB)
Collecting cffi!=1.11.3,>=1.8 (from cryptography>=2.6.1->wirecloud_keycloak)
  Downloading https://files.pythonhosted.org/packages/49/72/0d42f94fe94afa8030350c26e9d787219f3f008ec9bf6b86c66532b29236/cffi-1.13.2-cp36-cp36m-manylinux1_x86_64.whl (397kB)
Requirement already satisfied: regex in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2019.11.1)
Requirement already satisfied: django-haystack<2.8.0,>=2.6.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.7.0)
Requirement already satisfied: lxml>=2.3 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (4.4.1)
Requirement already satisfied: django-relatives<1.0.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (0.3.1)
Requirement already satisfied: pyScss<2.0,>=1.3.4 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (1.3.5)
Requirement already satisfied: pillow in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (6.2.1)
Requirement already satisfied: pycrypto in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.6.1)
Requirement already satisfied: jsonpatch in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (1.24)
Requirement already satisfied: markdown in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (3.1.1)
Requirement already satisfied: requests>=2.1.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.22.0)
Requirement already satisfied: whoosh>=2.7.2 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.7.4)
Requirement already satisfied: selenium>=3.4 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (3.141.0)
Requirement already satisfied: Pygments in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.4.2)
Requirement already satisfied: rdflib>=3.2.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (4.2.2)
Requirement already satisfied: user-agents in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.0)
Requirement already satisfied: django-appconf<2.0,>=1.0.1 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (1.0.3)
Requirement already satisfied: django-compressor<2.3,>=2.0 in /usr/local/lib/python3.6/site-packages (from wirecloud>=1.2.0->wirecloud_keycloak) (2.2)
Collecting txaio>=18.8.1 (from autobahn>=0.18->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/e9/6d/e1a6f7835cde86728e5bb1f577be9b2d7d273fdb33c286e70b087d418ded/txaio-18.8.1-py2.py3-none-any.whl
Collecting incremental>=16.10.1 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/f5/1d/c98a587dc06e107115cf4a58b49de20b19222c83d75335a192052af4c4b7/incremental-17.5.0-py2.py3-none-any.whl
Collecting attrs>=17.4.0 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/a2/db/4313ab3be961f7a763066401fb77f7748373b6094076ae2bda2806988af6/attrs-19.3.0-py2.py3-none-any.whl
Collecting hyperlink>=17.1.1 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/7f/91/e916ca10a2de1cb7101a9b24da546fb90ee14629e23160086cf3361c4fb8/hyperlink-19.0.0-py2.py3-none-any.whl
Collecting zope.interface>=4.4.2 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/05/16/79fe71428c91673194a21fedcc46f7f1349db799bc2a65da4ffdbe570343/zope.interface-4.7.1-cp36-cp36m-manylinux2010_x86_64.whl (168kB)
Collecting constantly>=15.1 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/b9/65/48c1909d0c0aeae6c10213340ce682db01b48ea900a7d9fce7a7910ff318/constantly-15.1.0-py2.py3-none-any.whl
Collecting Automat>=0.3.0 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/e5/11/756922e977bb296a79ccf38e8d45cafee446733157d59bcd751d3aee57f5/Automat-0.8.0-py2.py3-none-any.whl
Collecting PyHamcrest>=1.9.0 (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/92/1e/a87588eb4e301f7d7a945f7ca6aa430d9fc3f30022aa3984691f6e310162/PyHamcrest-1.10.1-py3-none-any.whl (48kB)
Collecting pyopenssl>=16.0.0; extra == "tls" (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/9e/de/f8342b68fa9e981d348039954657bdf681b2ab93de27443be51865ffa310/pyOpenSSL-19.1.0-py2.py3-none-any.whl (53kB)
Requirement already satisfied: idna!=2.3,>=0.6; extra == "tls" in /usr/local/lib/python3.6/site-packages (from twisted[tls]>=18.7->daphne~=2.3->channels) (2.8)
Collecting service-identity>=18.1.0; extra == "tls" (from twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/e9/7c/2195b890023e098f9618d43ebc337d83c8b38d414326685339eb024db2f6/service_identity-18.1.0-py2.py3-none-any.whl
Collecting pycparser (from cffi!=1.11.3,>=1.8->cryptography>=2.6.1->wirecloud_keycloak)
  Downloading https://files.pythonhosted.org/packages/68/9e/49196946aee219aead1290e00d1e7fdeab8567783e83e1b9ab5585e6206a/pycparser-2.19.tar.gz (158kB)
Requirement already satisfied: jsonpointer>=1.9 in /usr/local/lib/python3.6/site-packages (from jsonpatch->wirecloud>=1.2.0->wirecloud_keycloak) (2.0)
Requirement already satisfied: setuptools>=36 in /usr/local/lib/python3.6/site-packages (from markdown->wirecloud>=1.2.0->wirecloud_keycloak) (41.0.1)
Requirement already satisfied: certifi>=2017.4.17 in /usr/local/lib/python3.6/site-packages (from requests>=2.1.0->wirecloud>=1.2.0->wirecloud_keycloak) (2019.9.11)
Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/local/lib/python3.6/site-packages (from requests>=2.1.0->wirecloud>=1.2.0->wirecloud_keycloak) (3.0.4)
Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/local/lib/python3.6/site-packages (from requests>=2.1.0->wirecloud>=1.2.0->wirecloud_keycloak) (1.25.6)
Requirement already satisfied: pyparsing in /usr/local/lib/python3.6/site-packages (from rdflib>=3.2.0->wirecloud>=1.2.0->wirecloud_keycloak) (2.4.4)
Requirement already satisfied: isodate in /usr/local/lib/python3.6/site-packages (from rdflib>=3.2.0->wirecloud>=1.2.0->wirecloud_keycloak) (0.6.0)
Requirement already satisfied: ua-parser>=0.8.0 in /usr/local/lib/python3.6/site-packages (from user-agents->wirecloud>=1.2.0->wirecloud_keycloak) (0.8.0)
Requirement already satisfied: rcssmin==1.0.6 in /usr/local/lib/python3.6/site-packages (from django-compressor<2.3,>=2.0->wirecloud>=1.2.0->wirecloud_keycloak) (1.0.6)
Requirement already satisfied: rjsmin==1.0.12 in /usr/local/lib/python3.6/site-packages (from django-compressor<2.3,>=2.0->wirecloud>=1.2.0->wirecloud_keycloak) (1.0.12)
Collecting pyasn1-modules (from service-identity>=18.1.0; extra == "tls"->twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/95/de/214830a981892a3e286c3794f41ae67a4495df1108c3da8a9f62159b9a9d/pyasn1_modules-0.2.8-py2.py3-none-any.whl (155kB)
Collecting pyasn1 (from service-identity>=18.1.0; extra == "tls"->twisted[tls]>=18.7->daphne~=2.3->channels)
  Downloading https://files.pythonhosted.org/packages/62/1e/a94a8d635fa3ce4cfc7f506003548d0a2447ae76fd5ca53932970fe3053f/pyasn1-0.4.8-py2.py3-none-any.whl (77kB)
Building wheels for collected packages: posix-ipc, msgpack-python, pycparser
  Building wheel for posix-ipc (setup.py): started
  Building wheel for posix-ipc (setup.py): finished with status 'done'
  Stored in directory: /tmp/pip-ephem-wheel-cache-1_pgjkwz/wheels/5a/5c/17/d0e2d421abaf3b4097bf9db11108380d734195c6d15c24269d
  Building wheel for msgpack-python (setup.py): started
  Building wheel for msgpack-python (setup.py): finished with status 'done'
  Stored in directory: /tmp/pip-ephem-wheel-cache-1_pgjkwz/wheels/d5/de/86/7fa56fda12511be47ea0808f3502bc879df4e63ab168ec0406
  Building wheel for pycparser (setup.py): started
  Building wheel for pycparser (setup.py): finished with status 'done'
  Stored in directory: /tmp/pip-ephem-wheel-cache-1_pgjkwz/wheels/f2/9a/90/de94f8556265ddc9d9c8b271b0f63e57b26fb1d67a45564511
Successfully built posix-ipc msgpack-python pycparser
ERROR: wirecloud 1.3.1 has requirement Django<1.12,>=1.10, but you'll have django 3.0.2 which is incompatible.
ERROR: django-haystack 2.7.0 has requirement Django<1.12,>=1.8, but you'll have django 3.0.2 which is incompatible.
ERROR: asgi-ipc 1.4.2 has requirement asgiref~=1.1.2, but you'll have asgiref 3.2.3 which is incompatible.
ERROR: asgi-redis 1.4.3 has requirement asgiref~=1.1.2, but you'll have asgiref 3.2.3 which is incompatible.
ERROR: asgi-rabbitmq 0.5.5 has requirement asgiref~=1.1.2, but you'll have asgiref 3.2.3 which is incompatible.
Installing collected packages: asgiref, sqlparse, Django, pycparser, cffi, cryptography, txaio, autobahn, incremental, attrs, hyperlink, zope.interface, constantly, Automat, PyHamcrest, pyopenssl, pyasn1, pyasn1-modules, service-identity, twisted, daphne, channels, posix-ipc, msgpack-python, asgi-ipc, redis, asgi-redis, pika, cached-property, asgi-rabbitmq, wirecloud-keycloak
  Found existing installation: Django 1.11.26
    Uninstalling Django-1.11.26:
      Successfully uninstalled Django-1.11.26
Successfully installed Automat-0.8.0 Django-3.0.2 PyHamcrest-1.10.1 asgi-ipc-1.4.2 asgi-rabbitmq-0.5.5 asgi-redis-1.4.3 asgiref-3.2.3 attrs-19.3.0 autobahn-20.1.2 cached-property-1.5.1 cffi-1.13.2 channels-2.4.0 constantly-15.1.0 cryptography-2.8 daphne-2.4.1 hyperlink-19.0.0 incremental-17.5.0 msgpack-python-0.5.6 pika-0.11.2 posix-ipc-1.0.4 pyasn1-0.4.8 pyasn1-modules-0.2.8 pycparser-2.19 pyopenssl-19.1.0 redis-2.10.6 service-identity-18.1.0 sqlparse-0.3.0 twisted-19.10.0 txaio-18.8.1 wirecloud-keycloak-0.2.3 zope.interface-4.7.1
WARNING: You are using pip version 19.1.1, however version 19.3.1 is available.
You should consider upgrading via the 'pip install --upgrade pip' command.
Traceback (most recent call last):
  File "/usr/local/bin/wirecloud-admin", line 10, in <module>
    sys.exit(execute_from_command_line())
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/wirecloud_admin.py", line 139, in execute_from_command_line
    from wirecloud.commons.commands.convert import ConvertCommand
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/commands/convert.py", line 26, in <module>
    from wirecloud.commons.utils.template.parsers import TemplateParser
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/utils/template/__init__.py", line 2, in <module>
    from wirecloud.commons.utils.template.parsers import ObsoleteFormatError, TemplateFormatError, TemplateParseException, TemplateParser
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/utils/template/parsers/__init__.py", line 24, in <module>
    from wirecloud.commons.utils.template.parsers.json import JSONTemplateParser
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/utils/template/parsers/json.py", line 26, in <module>
    from wirecloud.platform.wiring.utils import get_wiring_skeleton, parse_wiring_old_version
  File "/usr/local/lib/python3.6/site-packages/wirecloud/platform/wiring/utils.py", line 26, in <module>
    from wirecloud.commons.utils.http import get_absolute_static_url, get_current_domain
  File "/usr/local/lib/python3.6/site-packages/wirecloud/commons/utils/http.py", line 26, in <module>
    from django.core.urlresolvers import reverse
ModuleNotFoundError: No module named 'django.core.urlresolvers'
The command '/bin/sh -c adduser --system --group --shell /bin/bash wirecloud &&     pip install --no-cache-dir channels asgi_ipc asgi_redis asgi_rabbitmq wirecloud_keycloak &&     mkdir -p /opt/wirecloud_instance /var/www/static &&     cd /opt &&     wirecloud-admin startproject wirecloud_instance wirecloud_instance &&     chown -R wirecloud:wirecloud wirecloud_instance /var/www/static &&     chmod a+x wirecloud_instance/manage.py' returned a non-zero code: 1
  • My build environment
$ lsb_release -a
No LSB modules are available.
Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.3 LTS
Release:	18.04
Codename:	bionic
$ uname -a
Linux ubuntu 4.15.0-74-generic #84-Ubuntu SMP Thu Dec 19 08:06:28 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
$ docker version
Client: Docker Engine - Community
 Version:           19.03.5
 API version:       1.40
 Go version:        go1.12.12
 Git commit:        633a0ea838
 Built:             Wed Nov 13 07:29:52 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.5
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.12
  Git commit:       633a0ea838
  Built:            Wed Nov 13 07:28:22 2019
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.10
  GitCommit:        b34a5c8af56e510852c35414db4c1f4fa6172339
 runc:
  Version:          1.0.0-rc8+dev
  GitCommit:        3e425f80a8c931f88e6d94a8c831b9d5aa481657
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Add a dev tag

Add a dev tag with the development version of WireCloud.

Provide a simple way for running manage.py commands

Currently, WireCloud images provide some commands (like initdb, createdefaultsuperuser ...) that is nice but, sometimes, running individual manage.py commands is required. Those commands can be executed by using docker-compose exec wirecloud bash and then running the manage.py commands inside the container. Anyway, adding this support is easy so lets make it.

Wirecloud docker container exits just after restarting it

After installing wirecloud through this command :

$ docker run --name some-wirecloud -d -p 80:80 fiware/wirecloud:latest

Wirecloud is running without any problem. But when I reboot my computer
and restart the docker container of wirecloud through this command:
$ docker restart some-wirecloud
the docker container exits just after restarting :

$ docker container ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9c5ade363d3f fiware/ngsiproxy "/bin/sh -c ngsi-p..." 3 days ago Up 2 days 3000/tcp beincpps-ngsiproxy
61c5dedd1bc7 fiware/wirecloud:latest "/docker-entrypoin..." 3 days ago Exited (0) Less than a second ago some-wirecloud

What is the best way to manage restarting the docker container after rebooting the machine ?

Make composable images trust x-forwarded-* headers

Current composables images run wirecloud using gunicorn, that forbids those headers by default. Default configuration should allow those headers, as composable images are meant to be used behind a front-end server (being nginx the one provided on the docker-compose.yml example). Anyway, this behaviour should be controlled by a environment variable allowing to disable them.

Wirecloud and Keyrock

Hey,
I can't login into Wirecloud with Keyrock.
Wirecloud settings:

wirecloud:
 restart: always
 image: fiware/wirecloud
 container_name: wirecloud
 depends_on:
     - postgres
     - elasticsearch
     - memcached
 environment:
     - DEBUG=True
     - VIRTUAL_HOST=wirecloud.mydomain.de
     - VIRTUAL_PORT=8000
     - LETSENCRYPT_HOST=wirecloud.mydomain.de
     - [email protected]
     - DEFAULT_THEME=wirecloud.defaulttheme
     - DB_HOST=postgres
     - DB_PASSWORD=wirepass   # Change this password!
     - FORWARDED_ALLOW_IPS=*
     - ELASTICSEARCH2_URL=http://elasticsearch:9200/
     - MEMCACHED_LOCATION=memcached:11211
     # Uncomment the following environment variables to enable IDM integration
     - FIWARE_IDM_PUBLIC_URL=https://keyrock.mydomain.de
     - FIWARE_IDM_SERVER=https://keyrock.mydomain.de
     - SOCIAL_AUTH_FIWARE_KEY=0955b004-a6b0-459c-bae9-36d16cda654g
     - SOCIAL_AUTH_FIWARE_SECRET=634fa7ad-940e-4fc9-abcf-a6091ca72e4e
 volumes:
     - ./wirecloud-data:/opt/wirecloud_instance/data
     - ./wirecloud-static:/var/www/static 
keyrock settings:
  keyrock:
    image: fiware/idm
    container_name: fiware-keyrock
    user: "996:995"
    depends_on:
        - keyrock-db
        - authzforce
    expose:
      - "3005"
    environment:
        - IDM_DB_HOST=keyrock-db
        - IDM_DB_PASS_FILE=/run/secrets/keyrock_db_password
        - IDM_DB_USER=root
        - IDM_HOST=http://localhost:3005
        - IDM_PORT=3005
        - IDM_HTTPS_ENABLED=false
        - IDM_ADMIN_USER=test
        - [email protected]
        - IDM_ADMIN_PASS=1234
        - IDM_PDP_LEVEL=advanced
        - IDM_AUTHZFORCE_ENABLED=true
        - IDM_AUTHZFORCE_HOST=authzforce
        - IDM_AUTHZFORCE_PORT=8080
        - VIRTUAL_HOST=keyrock.mydomain.de
        - VIRTUAL_PORT=3005
        - LETSENCRYPT_HOST=keyrock.mydomain.de
        - [email protected]
    secrets:
        - keyrock_db_password

I created an application in keyrock:
aY0HU

Wirecloud and keyrock are working fine. They are both behind a reverse tls ending proxy. No I try to login into Wirecloud. I click login and get redirected to Keyrock. Keyrock is asking me, if I want to allow or deny access (I'm already logged in). I click allow. The following URL get called:

https://wirecloud.mydomain.de/complete/fiware/?code=4f7a0a53070f1fd587270f1b4968d7e7bb5e40ad&state=DBRNiDOBc4OdzHBayh8vrznT1fthFSr5

It's loading for some seconds and I get a 502 Bad Gateway. Wirecloud logs:

[2019-11-12 15:49:06 +0000] [1] [INFO] Starting gunicorn 19.3.0
[2019-11-12 15:49:06 +0000] [1] [INFO] Listening at: http://0.0.0.0:8000 (1)
[2019-11-12 15:49:06 +0000] [1] [INFO] Using worker: sync
[2019-11-12 15:49:06 +0000] [57] [INFO] Booting worker with pid: 57
[2019-11-12 15:49:06 +0000] [59] [INFO] Booting worker with pid: 59
[2019-11-12 15:50:07 +0000] [1] [CRITICAL] WORKER TIMEOUT (pid:57)
[2019-11-12 09:50:07 -0600] [57] [INFO] Worker exiting (pid: 57)
[2019-11-12 15:50:07 +0000] [188] [INFO] Booting worker with pid: 188

reverse proxy log:

keyrock.mydomain.de 10.10.100.10 - - [12/Nov/2019:16:07:00 +0000] "POST /oauth2/enable_app?client_id=0955b004-a6b0-459c-bae9-36d16cda654e&redirect_uri=https://wirecloud.mydomain.de/complete/fiware/&state=DBRNiDOBc4OdzHBayh8vrznT1fthFSr5&response_type=code HTTP/2.0" 302 328 "https://keyrock.mydomain.de/oauth2/authorize?client_id=0955b004-a6b0-459c-bae9-36d16cda654e&redirect_uri=https://wirecloud.mydomain.de/complete/fiware/&state=DBRNiDOBc4OdzHBayh8vrznT1fthFSr5&response_type=code" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"
2019/11/12 16:07:30 [error] 565#565: *3080 upstream prematurely closed connection while reading response header from upstream, client: 10.10.100.10, server: wirecloud.mydomain.de, request: "GET /complete/fiware/?code=22a1188950f5b23d54ba3f6e4ffe0d26a0bc5194&state=DBRNiDOBc4OdzHBayh8vrznT1fthFSr5 HTTP/2.0", upstream: "http://172.24.0.13:8000/complete/fiware/?code=22a1188950f5b23d54ba3f6e4ffe0d26a0bc5194&state=DBRNiDOBc4OdzHBayh8vrznT1fthFSr5", host: "wirecloud.mydomain.de", referrer: "https://keyrock.mydomain.de/oauth2/authorize?client_id=0955b004-a6b0-459c-bae9-36d16cda654e&redirect_uri=https://wirecloud.mydomain.de/complete/fiware/&state=DBRNiDOBc4OdzHBayh8vrznT1fthFSr5&response_type=code"
wirecloud.mydomain.de 10.10.100.10 - - [12/Nov/2019:16:07:30 +0000] "GET /complete/fiware/?code=22a1188950f5b23d54ba3f6e4ffe0d26a0bc5194&state=DBRNiDOBc4OdzHBayh8vrznT1fthFSr5 HTTP/2.0" 502 559 "https://keyrock.mydomain.de/oauth2/authorize?client_id=0955b004-a6b0-459c-bae9-36d16cda654e&redirect_uri=https://wirecloud.mydomain.de/complete/fiware/&state=DBRNiDOBc4OdzHBayh8vrznT1fthFSr5&response_type=code" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/78.0.3904.97 Safari/537.36"

I don't see my mistake. Hope you guys can help.

Wirecloud failed to run in Firefox / Chrome

Dear Commnity,
I am running dockerized images of wirecloud+nginx from a remote server, trying to access Wirecloud from my browser. Wirecloud failed to load correctly, issuing the following message:

Your browser seems to lack some required features
We recommend you to upgrade your browser to the newest version of either Firefox or Google Chrome as these are the browsers currently supported by WireCloud.

new wirecloud

I can confirm my browsers (firefox and chrome) are up-to-date, and I can run wirecloud locally on my machine using same browsers, as in following image:
wirecloud 2

Any idea why this problem happpens? Below is my docker-compose file.

version: "3.1"
services:
 nginx:
    restart: always
    container_name: fiware-nginx
    image: nginx
    networks:
      - default
    ports:
      - 53153:80
    volumes:
      - ./nginx.conf:/etc/nginx/nginx.conf:ro
      - ./wirecloud-static:/var/www/static:ro
      - ./nginx_logs:/var/log/nginx
    depends_on:
      - wirecloud
 postgres:
    restart: always
    image: postgres:10
    hostname: postgres
    container_name: fiware-postgres
    expose:
      - "5432"
    ports:
      - "5432:5432"
    networks:
      - default
    environment:
      - "POSTGRES_PASSWORD=password"
      - "POSTGRES_USER=postgres"
      - "POSTGRES_DB=postgres"
    volumes:
      - ./postgres-data:/var/lib/postgresql/data
 elasticsearch:
    restart: always
    container_name: fiware-elasticsearch
    image: elasticsearch:2.4
    volumes:
      - ./elasticsearch-data:/usr/share/elasticsearch/data
    command: elasticsearch  -Des.index.max_result_window=50000
 memcached:
    restart: always
    container_name: fiware-memcached
    image: memcached:1
    command: memcached -m 2048m  
 wirecloud:
    restart: always
    image: fiware/wirecloud
    container_name: fiware-wirecloud
    networks:
        - default
    depends_on:
        - postgres
        - elasticsearch
        - memcached
    environment:
        - DEBUG=False
        - DB_HOST=postgres
        - DB_PASSWORD=password # Change this password!
        - FORWARDED_ALLOW_IPS=*
        - ELASTICSEARCH2_URL=http://elasticsearch:9200/
        - MEMCACHED_LOCATION=memcached:11211
    volumes:
      - ./wirecloud-data:/opt/wirecloud_instance/data
      - ./static:/var/www/static

Unable to launch docker image of wirecloud

■ I got an error when I put -e DEBUG=False or unspecified.

docker run -p 8000:8000 \
 -e DEBUG=False \
 fiware/wirecloud:1.2

or

docker run -p 8000:8000 \
 fiware/wirecloud:1.2

image

■ No error with -e DEBUG=True

docker run -p 8000:8000 \
 -e DEBUG=True \
 fiware/wirecloud:1.2

image

I had the same problem with fiware/wirecloud:1.3 and fiware/wirecloud:latest.

Why do I need to add -e DEBUG=True?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.