Internal Documentation

This document may change at any time without prior notice.
Changes may break backwards compatibility.
Do not rely on it!

Cloud Setup Multi-Node Simulation With One Unblu Server

1. Purpose

This document describes, how to configure unblu to start the "universe" product from within an ide (eclipse) which - for the browser - behaves as if multiple (separate) cloud nodes would have been deployed.
This greatly helps to test a cloud setup on the developers machine with little effort.

2. Howto configure

2.1. DNS / host file settings

The following DNS (or alternatively /etc/host file) settings are required:

127.0.0.1 test-cdn.unblu.com
127.0.0.1 test-start.unblu.com
127.0.0.1 test-dispatcher.unblu.com
127.0.0.1 test-authenticator.unblu.com
127.0.0.1 test-onboarding.unblu.com
127.0.0.1 test-desk.unblu.com

127.0.0.1 test-worker01.unblu.com

# use this, if you want to avoid snippet adaptations to test-start.unblu.com
127.0.0.1 start.unblu.com

Of course other IPs (instead of 12.0.0.1) can be used as well.

2.2. unblu server configuration

The base configuration enables cluster setup, which is what cloud is configured with:

# configure server as if it was a cloud node
com.unblu.identifier.clusterEnabled=true
com.unblu.identifier.clusterUniverseCookieDomain=.unblu.com
com.unblu.server.cors.enabled=true
com.unblu.server.cors.allowedOriginPatterns=^.*$
com.unblu.platform.shared.core.OriginLocator.origins=staticContent=https://test-cdn.unblu.com,clientProductRepository=https://test-start.unblu.com,messagingDefault=https://test-start.unblu.com,dispatcher=https://test-dispatcher.unblu.com,authenticator=https://test-authenticator.unblu.com,onboarding=https://test-onboarding.unblu.com,desk=https://test-desk.unblu.com

# a "default" server base url must be present, which is used internally for everything not handled during a http request
com.unblu.identifier.serverBaseUrl=https://start.unblu.com

# currently, restrictedServerBaseUrl is always static
com.unblu.identifier.restrictedServerBaseUrl=https://start.unblu.com

 

Two configuration settings are required in addition to the cloud setup to simulate the cluster with one instance. These are available as of unblu version 3.5:

# let server evaluate serverBaseUrl during requests dynamically by using the submitted "Host" or "X-Forwarded-*" headers of the request
com.unblu.identifier.useRequestedHostAsBaseUrl=true

# assign a fixed worker url - we can only simulate one worker instance for now
# this is always returned, when a worker is asked for its origin
com.unblu.identifier.integratedWorkerBaseUrl=https://test-worker01.unblu.com

3. Howto Test

In order to start testing, go to https://test-start.unblu.com (co-visitor / agent).

Don't forget to adapt the snippets to https://test-start.unblu.com or alternatively re-direct start.unblu.com to 127.0.0.1 as well.

4. Etest

Etest also supports this kind of setup.

Use https://etest-configuration.unblu.com/properties/etest-singlenode-cloud.properties as your property overlay when starting cloud universe and then start testing using:

https://etest-start.unblu.com

5. Limitations

Due to the fact, that it is only one server instance, it is currently not possible to simulate certain server side functionalities (i.e. dispatcher connecting to workers to retrieve token informations). Instead of what would happen on real cloud node instances, where remote procedure calls over http are executed, the ide currently does not go over network to communicate between different origin parts.

How can we help?

Chat with us and we will take you through our site!

Read about how we use cookies and how you can control them by clicking "Cookie Settings." If you continue to use this site, you consent to our use of cookies.