Skip to content

forest-extension/testst

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Getting Started

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


1. Dispatch git actions

First, you need to sync your repository with Forest-extension workflows.

  • Sync your repository with Forest-extension workflows. follow 1~4 steps. img

2. Create plugin template with git actions

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.

img


3. Run plugin server

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

How to build plugin container image

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.

img

If you want to build plugin container image manually, follow this step.

$ docker build -t <image_name>:<tag> .

How to test plugin

You need to install spacectl to test plugin.

$ pip install --upgrade spacectl