🔋 A CLI for performing admin operations. It's a wrapper around admin API endpoints for making it easier to interact with the pandora system.
- Ruby (2.6.x or 2.7.x). You can use
rbenv
for this (https://github.com/rbenv/rbenv).
Clone this repository into your machine:
$ git clone https://github.com/jcbages/pandoractl.git
Go into the pandoractl
folder:
$ cd <path_to_pandoractl_folder>
Add execution permissions to the CLI binary:
$ [sudo] chmod +x ./bin/pandoractl
That's it! 🎉 Now you can run pandoractl
like this (inside the pandoractl
directory) and get a list of the possible commands:
$ ./bin/pandoractl
You can add pandoractl
binary to you path by adding this to the end of your .bash_profile
/ .bashrc
file:
export PATH=$PATH:<path_to_pandoractl_folder>/bin
Then you need to source
the file you modified so that your changed are applied:
$ source ~/.bash_profile (or ~/.bashrc)
🎉Yay! Now you can run pandoractl
from everywhere on your terminal.
Note: If you didn't add pandoractl
to your PATH
then you need to run the CLI as shown on the last step of the installation section.
You can get a help about a specific command by running:
$ pandoractl help COMMAND
As this is an admin tool, you need to login first in order to run any operation. You can login by running:
$ pandoractl login USER PASSWORD
pandoractl
will store your access token so you can now run any admin operation. If you wish to remove this access token from your machine, you can logout by running:
$ pandoractl logout
You can get a list of all your services by running:
$ pandoractl get_services
If you want information about only one service, you can pass its id
like this:
$ pandoractl get_services --id=SERVICE_ID
For creating a new service you must pass the name of the service which mush be unique among your already existing services:
$ pandoractl create_service NAME
You can only delete non-empty services. That is services with 0 entries. To erase an empty service you can run:
$ pandoractl delete_service SERVICE_ID
You can assign a custom host to an existing service. Just make sure the custom host is pointing to Pandora's IP at 159.89.223.59
. You can do this by adding an A Record
to the DNS configuration of your domain provider. An SSL certificate will be generated in the background after setting the custom host. To set a custom host you can run:
$ pandoractl set_custom_host SERVICE_ID CUSTOM_HOST
Note: The format of your custom host must not include any protocol (e.g. http
) nor wildcard URL (*
). Example of a valid custom host: example.com
You can delete any custom host assigned to one of your services by running:
$ pandoractl delete_custom_host SERVICE_ID