1. Dispatch git actions
2. Create plugin template with git actions
3. Run plugin server
How to build plugin container image
How to test plugin
First, you need to sync your repository with Forest-extension workflows.
Dispatch Create Plugin Template
workflow. follow and just click 1~3 steps.
Choose your resource_type
one of below at 4th step.
- inventory.Collector
- cost-analysis.DataSource
- monitoring.DataSource
- monitoring.Webhook
- notification.Notification
- identity.ExternalAUth
At 5th step, you can input Cloudforet's core package version.
You can check the latest version at here.
Before running plugin server, you need to install some packages.
- Install spaceone-core package
$ pip install --upgrade spaceone-core
- Install spaceone core application packages. It depends on your
resource_type
.- inventory.Collector -> spaceone-inventory
- cost-analysis.DataSource -> spaceone-cost-analysis
- monitoring.DataSource -> spaceone-monitoring
- monitoring.Webhook -> spaceone-monitoring
- notification.Notification -> spaceone-notification
- identity.ExternalAUth -> spaceone-identity
$ pip install --pre --upgrade spaceone-inventory
Now, you are ready to run plugin server. Let's run plugin server with this command below.
$ spaceone run plugin-server plugin -s ./src
We recommend you to use our git actions to build plugin container image.
You can just click Actions
tab and click Run workflow
button.
then you can see container image in your repository's packages
folder.
If you want to build plugin container image manually, follow this step.
$ docker build -t <image_name>:<tag> .
You need to install spacectl to test plugin.
$ pip install --upgrade spacectl