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-4a34cdc093d6b5ba.cleverapps.io

You can connect on your instance with the following credentials

4a34cdc093d6b5ba@otoroshi.io / 3e8ce4337d7d5ed9bf56cf2d8fcdace

You can use your instance api at

https://otoroshi-api-4a34cdc093d6b5ba.cleverapps.io

with the following authorization header

Authorization: Basic NGI0NmU3OTI0NjVlYTM4OTE0M2E1ODg5YTZhZDg1NTU6NDk5OGUwMTRkNGE2OGIxNTgxMjFmMTZmMmVjYmU4NA==

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

ADMIN_API_CLIENT_ID=4b46e792465ea389143a5889a6ad8555
ADMIN_API_CLIENT_SECRET=4998e014d4a68b158121f16f2ecbe84
ADMIN_API_GROUP=261146bf4bae1441474c38ea69e07b50
ADMIN_API_SERVICE_ID=b1b700a8eaba2046bd2a4a39fb2ebf3
CLAIM_SHAREDKEY=642488df3f8d96044faf35d19b8030ef
OTOROSHI_INITIAL_ADMIN_LOGIN=4a34cdc093d6b5ba@otoroshi.io
OTOROSHI_INITIAL_ADMIN_PASSWORD=3e8ce4337d7d5ed9bf56cf2d8fcdace
OTOROSHI_SECRET=f1e3ba662531276c201c44f673e8924c
PLAY_CRYPTO_SECRET=83394a639576a48f624518f92dbb04c
SESSION_NAME=oto-session-ae9367f8
APP_DOMAIN=cleverapps.io
APP_BACKOFFICE_SUBDOMAIN=otoroshi-4a34cdc093d6b5ba
APP_PRIVATEAPPS_SUBDOMAIN=otoroshi-papps-4a34cdc093d6b5ba
ADMIN_API_TARGET_SUBDOMAIN=otoroshi-api-int-4a34cdc093d6b5ba
ADMIN_API_EXPOSED_SUBDOMAIN=otoroshi-api-4a34cdc093d6b5ba
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-4a34cdc093d6b5ba
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 ```