Sign inSign up

banzaicloud/plugin-pipeline-client

By banzaicloud

•Updated about 8 years ago

Pipeline REST API client plugin for Drone.

Image
0

2.8K

banzaicloud/plugin-pipeline-client repository overview

⁠Pipeline API client plugin for Drone

Pipeline REST API client plugin for Drone. A step in the Pipeline PaaS CI/CD component to provision a Kubernetes cluster or use a managed one. Currently two cloud provider supported Amazon and Azure(AKS).

⁠Specify required secrets

Provide valid credentials for the pipeline API.

These options needs to be specified in the CI/CD GUI⁠.

  • plugin_endpoint: http://[control-plane-host]/pipeline
  • plugin_username: Specified pipeline username
  • plugin_password: Specified pipeline password
⁠Create or use existing cluster (Amazon EC2)
pipeline:
  create_cluster:
    cluster_name: "demo-cluster1"
    image: banzaicloud/pipeline_client:latest
    secrets: [ plugin_endpoint, plugin_username, plugin_password ]
⁠Create or use existing cluster (Azure AKS)
pipeline:
  create_cluster:
    cluster_name: "demo-cluster1"
    cluster_provider: azure
    image: banzaicloud/pipeline_client:latest
    secrets: [ plugin_endpoint, plugin_username, plugin_password ]
⁠Main options
OptionDescriptionDefaultRequired
cluster_nameSpecified cluster name""Yes
cluster_providerSpecified supporter provider (amazon, azure)amazonNo
log_levelSpecified log level (info, warning,error, critical)infoNo
log_formatSpecified log format (json, text)jsonNo
⁠Cloud provider specific options
⁠Amazon
OptionDescriptionDefaultRequired
amazon_master_imageSpecified image for master nodeami-06d1667fNo
amazon_master_instance_typeSpecified instance type for master node"m4.xlarge"No
amazon_node_imageSpecified image for nodeami-06d1667fNo
amazon_node_instance_typeSpecified instance type for node"m4.xlarge"No
amazon_node_min_countSpecified node count1No
amazon_node_min_countSpecified node count1No
amazon_node_spot_priceSpecified spot price0 (normal instance)No
⁠Azure (AKS)

In case of Azure a resource group has to be used. Use the Azure CLI to create an Azure Resource Group: https://docs.microsoft.com/en-us/azure/azure-resource-manager/xplat-cli-azure-resource-manager⁠

OptionDescriptionDefaultRequired
azure_resource_groupExisting azure resource group""Yes
azure_kubernetes_versionSpecified kubernetes version"1.8.2"No
azure_agent_nameSpecified agent namecluster_name⁠No
azure_node_instance_typeSpecified instance type"Standard_D4s_v3"No
azure_node_countInitial number of nodes1No
⁠Dynamic application specific secrets

Applications deployed by CI/CD may require options of which value is unknown until deployment time or doesn't want to specify it directly in .pipeline.yml file thus the user will only be able to specify them when hooks the application to the CI/CD flow. Such values can be passed to the application through CI/CD secrets. The values are bound to the keys listed under deployment_values -> app which is illustrated in the example below.

E.g.:

install_my_app:
    image: my_app_docker_image:latest

    deployment_name: "my_app_helm_chart"
    deployment_release_name: "my_app"
    deployment_values:
      app:
        logDirectory: "...."
        db_user: "root"
        db_password: "{{ .PLUGIN_DATABASE_PASSWORD }}"
    secrets: [ plugin_endpoint, plugin_username, plugin_password, plugin_database_password ]

In this example beside the required secrets⁠ there is a plugin_database_password through which we can set up a password through the CI/CD flow. Note the placeholder {{ .PLUGIN_DATABASE_PASSWORD }} specified for plugin_database_password key in the yaml. This placeholder will be replaced with the value of plugin_database_password secret.

Are you a developer? Click here⁠

Tag summary

Content type

Image

Digest

Size

5.8 MB

Last updated

about 8 years ago

docker pull banzaicloud/plugin-pipeline-client