For every user, Openshift Container Platform offers 1G memory, that is enough to deploy and use Huginn, and 1G external storage, which can be used for database will have about one hundred thousand rows.
Deployment
Login the Openshift account–>open console–>Import YAML / JSON
The Huginn supports two kinds of databases, mysql and postgresql. It’s recommend to deploy with postgresql, which uses the less memory.
Copy the content of JSON file to openshift–>Create–>Continue
You should change these variables. For others, change them with your requirements.
- Name
A part of the address of app - Huginn SEED_USERNAME
- Huginn SEED_PASSWORD
- Huginn SEED_EMAIL
- Cluster Name
Depend on the location on which you chose to create the projectStarter US East (N. Virginia) Starter US West (California) Starter US West (Oregon) Starter Canada (Central) Cluster Name starter-us-east-1 starter-us-west-1 starter-us-west-2 starter-ca-central-1 - Router Shard
Depend on the location on which you chose to create the projectStarter US East (N. Virginia) Starter US West (California) Starter US West (Oregon) Starter Canada (Central) Router Shard 1d35 a3c1 7e14 193b - Memory Limit
Suggest to set768Mi
for preventing always getting the502
http code with the512Mi
memory. Test thirty agents and only cost about700Mi
memory generally. - Memory Limit (PostgreSQL)
Suggest to set256Mi
(no less than 256Mi). Test thirty agents and only cost about100Mi
memory.
- Database Name
Don’t generate defaultly, or get the regex error12345678For general container run, you must either specify the following environmentvariables:POSTGRESQL_USER (regex: '^[a-zA-Z_][a-zA-Z0-9_]*$')POSTGRESQL_PASSWORD (regex: '^[a-zA-Z0-9_~!@#$%^&*()-=<>,.?;:|]+$')POSTGRESQL_DATABASE (regex: '^[a-zA-Z_][a-zA-Z0-9_]*$')Or the following environment variable:POSTGRESQL_ADMIN_PASSWORD (regex: '^[a-zA-Z0-9_~!@#$%^&*()-=<>,.?;:|]+$')Or both. - Database User
Don’t generate defaultly, or get the regex error - Database Password
Don’t generate defaultly, or get the regex error
View the Variables
Applications–>Deployments(Pods)–>huginn
Some variables have set to the secret value
. you can see them at Resourses–>Secrets–>huginn.
Usage
You should create a Scheduler Agent
, not the schedule
of agents, to control agents for the resource hibernation of Openshift.
1 2 3 4 |
{ "action": "run", "schedule": "*/15 7-23 * * * Asia/Shanghai" } |
*/15 7-23 * * * Asia/Shanghai
: running per 15 minutes from seven to twenty-three o’clock every day on the Asia/Shanghai timezone.