This repository aims to provide provisioning stuff for OpenPaaS via API requests.
Before doing anything, you need to create an .env
file with the following environment variables (you can copy from):
OPENPAAS_URL=http://localhost:8080
PLATFORM_ADMIN_USERNAME=[email protected]
PLATFORM_ADMIN_PASSWORD=secret
OPENPAAS_URL
(optional): The url to the OpenPaaS web server (the default value ishttp://localhost:8080
).PLATFORM_ADMIN_USERNAME
(required): The username of the platform admin.PLATFORM_ADMIN_PASSWORD
(required): The password of the platform admin.
The following command will create a domain and fill it with auto-generated users. After the users have been created, it will generate a CSV file in the output folder with the list of user accounts.
node scripts/createDomainWithMembers.js [email protected] --numOfUsers=4000
domainAdminEmail
(required): The email for the new domain admin. The script will take the email domain in this email as the name for the new domain.domainAdminPassword
(optional): The account password for the new domain (the default value issecret
).numOfUsers
(optional): The number of users that are going to be created (the default value is100
).
The following command will generate a random number of events in the default calendar for each user account listed in a CSV file:
node scripts/generateRandomEventsForUsers --csvFilename=users-2020-11-12-17-49-6.csv --minNumOfEvents=2 --maxNumOfEvents=5
csvFilename
(required): The CSV filename in the output folder that contains the list of user accounts.minNumOfEvents
(optional): The min number of events that are going to be randomly generated (the default value is2
).maxNumOfEvents
(optional): The max number of events that are going to be randomly generated (the default value is5
).