Clever-Cloud

Now you want to use Otoroshi on Clever Cloud. Otoroshi has been designed and created to run on Clever Cloud and a lot of choices were made because of how Clever Cloud works.

Create an Otoroshi instance on CleverCloud

If you want to customize the configuration use env. variables, you can use the example provided below

Create a new CleverCloud app based on a clevercloud git repo (not empty) or a github project of your own (not empty).

Then choose what kind of app your want to create, for Otoroshi, choose Java + Jar

Next, set up choose instance size and auto-scalling. Otoroshi can run on small instances, especially if you just want to test it.

Finally, choose a name for your app

Now you just need to customize environnment variables

at this point, you can also add other env. variables to configure Otoroshi like in the example provided below

You can also use expert mode :

Now, your app is ready, don’t forget to add a custom domains name on the CleverCloud app matching the Otoroshi app domain.

Example of CleverCloud env. variables

You can add more env variables to customize your Otoroshi instance like the following. Use the expert mode to copy/paste all the values in one shot. If you want an real datastore, create a redis addon on clevercloud, link it to your otoroshi app and change the APP_STORAGE variable to redis

Domain name Otoroshi storage User login User password
Your otoroshi instance will be located at

https://otoroshi-ee3bf1d4d9eb00f9.cleverapps.io

You can connect on your instance with the following credentials

ee3bf1d4d9eb00f9@otoroshi.io / cd22e4ae0073351a1f48069af35fb9d

You can use your instance api at

https://otoroshi-api-ee3bf1d4d9eb00f9.cleverapps.io

with the following authorization header

Authorization: Basic N2U1NjNkYWQxY2VmYzE2ODJlYTcxNjdlZDlhMzRiYWI6ZjNhZjIzZmZjMzdhZTdjYWFkNmM3ZTcxM2Y4OGE2

copy the following environment variables in you clevercloud app in expert mode :

ADMIN_API_CLIENT_ID=7e563dad1cefc1682ea7167ed9a34bab
ADMIN_API_CLIENT_SECRET=f3af23ffc37ae7caad6c7e713f88a6
ADMIN_API_GROUP=96586af09540d1798780818ad91d4eba
ADMIN_API_SERVICE_ID=329da1fae4a698dabce7dddc66ad2d5
CLAIM_SHAREDKEY=e2a9e29bf2424636ba08af90cd2e05c5
OTOROSHI_INITIAL_ADMIN_LOGIN=ee3bf1d4d9eb00f9@otoroshi.io
OTOROSHI_INITIAL_ADMIN_PASSWORD=cd22e4ae0073351a1f48069af35fb9d
OTOROSHI_SECRET=d2959275f8bdcc19ca2dc11eff8d9ed1
PLAY_CRYPTO_SECRET=5d53acaf20d53f7bc6457904351df6b4
SESSION_NAME=oto-session-d794294f
APP_DOMAIN=cleverapps.io
APP_BACKOFFICE_SUBDOMAIN=otoroshi-ee3bf1d4d9eb00f9
APP_PRIVATEAPPS_SUBDOMAIN=otoroshi-papps-ee3bf1d4d9eb00f9
ADMIN_API_TARGET_SUBDOMAIN=otoroshi-api-int-ee3bf1d4d9eb00f9
ADMIN_API_EXPOSED_SUBDOMAIN=otoroshi-api-ee3bf1d4d9eb00f9
APP_ENV=prod
APP_STORAGE=inmemory
APP_ROOT_SCHEME=https
CC_OTO_VERSION=curl https://updates.otoroshi.io/api/versions/latest | jq -r '.version_raw'; 
CC_PRE_BUILD_HOOK=curl -L -o otoroshi.jar 'https://github.com/MAIF/otoroshi/releases/download/1.4.22/otoroshi.jar'
CC_JAR_PATH=./otoroshi.jar
CC_JAVA_VERSION=11
PORT=8080
SESSION_DOMAIN=.cleverapps.io
SESSION_MAX_AGE=604800000
SESSION_SECURE_ONLY=true
USER_AGENT=otoroshi-ee3bf1d4d9eb00f9
MAX_EVENTS_SIZE=1
WEBHOOK_SIZE=100
APP_BACKOFFICE_SESSION_EXP=86400000
APP_PRIVATEAPPS_SESSION_EXP=86400000
ENABLE_METRICS=true
OTOROSHI_ANALYTICS_PRESSURE_ENABLED=true
USE_CACHE=true
``` ADMIN_API_CLIENT_ID=xxxx ADMIN_API_CLIENT_SECRET=xxxxx ADMIN_API_GROUP=xxxxxx ADMIN_API_SERVICE_ID=xxxxxxx CLAIM_SHAREDKEY=xxxxxxx OTOROSHI_INITIAL_ADMIN_LOGIN=youremailaddress OTOROSHI_INITIAL_ADMIN_PASSWORD=yourpassword PLAY_CRYPTO_SECRET=xxxxxx SESSION_NAME=oto-session APP_DOMAIN=yourdomain.tech APP_ENV=prod APP_STORAGE=inmemory APP_ROOT_SCHEME=https CC_PRE_BUILD_HOOK=curl -L -o otoroshi.jar 'https://github.com/MAIF/otoroshi/releases/download/${latest_otoroshi_version}/otoroshi.jar' CC_JAR_PATH=./otoroshi.jar CC_JAVA_VERSION=11 PORT=8080 SESSION_DOMAIN=.yourdomain.tech SESSION_MAX_AGE=604800000 SESSION_SECURE_ONLY=true USER_AGENT=otoroshi MAX_EVENTS_SIZE=1 WEBHOOK_SIZE=100 APP_BACKOFFICE_SESSION_EXP=86400000 APP_PRIVATEAPPS_SESSION_EXP=86400000 ENABLE_METRICS=true OTOROSHI_ANALYTICS_PRESSURE_ENABLED=true USE_CACHE=true ```