Spinnaker Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
 
(31 intermediate revisions by the same user not shown)
Line 13: Line 13:
Follow specific configuration instructions depending on the authentication method against the backend.
Follow specific configuration instructions depending on the authentication method against the backend.
{{External|https://spinnaker.io/docs/setup/other_config/spin/#configure-spin}}
{{External|https://spinnaker.io/docs/setup/other_config/spin/#configure-spin}}
==Options==
===<tt>-k|--insecure</tt>===
Ignore certificate errors.
==Operations==
<syntaxhighlight lang='bash'>
spin -k application list
</syntaxhighlight>


=Application Operations=
=Application Operations=
==Create an Application==
==Create an Application==
{{Internal|Delivery_Pipeline_for_Simple_Java_Application_from_GitHub_to_Kubernetes_with_Spinnaker#Create_Application|Delivery Pipeline for Simple Java Application from GitHub to Kubernetes &#124; Create Application}}
{{Internal|Spinnaker_Create_and_Configure_an_Application#Create_an_Application|Create and Configure an Application}}
 
==Configure an Application==
==Configure an Application==
{{External|https://spinnaker.io/docs/guides/user/applications/configure/}}
{{Internal|Spinnaker_Create_and_Configure_an_Application#Configure_an_Application|Create and Configure an Application}}
<font color=darkkhaki>TO PROCESS.</font>
=Artifact Accounts=
==Configure GitHub as an Artifact Account==
{{External|https://spinnaker.io/docs/setup/other_config/artifacts/github/}}
===GitHub Trigger - Allow GitHub to Post Push Events===
{{External|https://spinnaker.io/docs/guides/tutorials/codelabs/kubernetes-v2-source-to-prod/#allow-github-to-post-push-events}}
 
==Configure a Docker Registry Account==
{{External|https://spinnaker.io/docs/setup/install/providers/docker-registry/}}
===Docker Trigger - Allow Docker to Post Build Events===
{{External|https://spinnaker.io/docs/guides/tutorials/codelabs/kubernetes-v2-source-to-prod/#allow-docker-to-post-build-events}}


=Pipeline Operations=
=Pipeline Operations=
==List Pipelines==
<syntaxhighlight lang='bash'>
spin [-k] pipeline list --application my-application
</syntaxhighlight>
==Create a Pipeline==
==Create a Pipeline==
{{External|https://spinnaker.io/docs/guides/user/pipeline/managing-pipelines/#create-a-pipeline}}
===Create a Pipeline from the UI===
=Delivery Pipeline for Simple Java Application from GitHub to Kubernetes=
{{Internal|Spinnaker Create a Deployment Pipeline from UI#Overview|Create a Deployment Pipeline from the UI}}
{{Internal|Delivery Pipeline for Simple Java Application from GitHub to Kubernetes with Spinnaker#Overview|Delivery Pipeline for Simple Java Application from GitHub to Kubernetes}}
 
===Create a Pipeline from Command Line with <tt>spin</tt>===
{{Internal|Spinnaker Create Pipeline from Command Line#Overview|Create Pipeline from Command Line with <tt>spin</tt>}}
 
===Create a Pipeline from Template===
{{Internal|Spinnaker Create a Pipeline from Template#Overview|Create a Pipeline from Template}}
==Executing a Pipeline==
===Executing a Pipeline in Command Line===
{{Internal|Spinnaker Executing a Pipeline in Command Line#Overview|Executing a Pipeline in Command Line}}
 
==Delete a Pipeline==
<syntaxhighlight lang='bash'>
spin pipeline delete --name my-pipeline --application my-application
</syntaxhighlight>
==Insert a Stage into an Existing Pipeline==
Use the JSON representation. Select the pipeline → Pipeline Actions → Edit as JSON → identity "stages" and introduce the JSON representation of the stage.
 
Update the <code>refId</code>, otherwise you'll get "Error: The refId property must be unique across stages. Duplicate id(s): 5".
 
Also update the <code> requisiteStageRefIds</code>, otherwise you'll get the stage inserted after the wrong stage.
 
Update the <code> requisiteStageRefIds</code> of the stage that follows.
 
<syntaxhighlight lang='json'>
{
      "name": "BreakPoint",
      "refId": "5",
      "requisiteStageRefIds": [
        "4"
      ],
    },
</syntaxhighlight>
==Copy and Paste a Pipeline as JSON==
* Create an empty pipeline.
* Go to the source pipeline → Configure → Pipeline Actions → Edit as JSON
* Copy the content of "stages" and paste.
** Update stages accordingly.
** ⚠️ Search for "moniker" and replace the value with the value of the application name:
<syntaxhighlight lang='json'>
{
  [...]
  "stages": [
    {
      [...]
      "moniker": {
        "app": "my-app-name"
      },
  [...]
  ]
}
</syntaxhighlight>
* If necessary, copy the content of "parameterConfig" and paste.
 
=Pipeline Template Operations=
{{Internal|Spinnaker Pipeline Template Operations|Pipeline Template Operations}}


=Blue-Green Deployments with Spinnaker=
=Blue-Green Deployments with Spinnaker=
{{Internal|Blue-Green_Deployments_with_Spinnaker#Overview|Blue-Green Deployments with Spinnaker}}
{{Internal|Blue-Green_Deployments_with_Spinnaker#Overview|Blue-Green Deployments with Spinnaker}}
=Running an Arbitrary Script=
{{Internal|Spinnaker_Concepts#Running_Arbitrary_Functionality_in_a_Pipeline_Stage|Running Arbitrary Functionality in a Pipeline Stage}}
=Log Management=
<font color=darkkhaki>TO INVESTIGATE:
* https://spinnaker.io/docs/guides/user/kubernetes-v2/run-job-manifest/#viewing-execution-logs
</font>

Latest revision as of 03:32, 31 May 2023

Internal

CLI Access

https://spinnaker.io/docs/guides/spin/

Installation and Configuration

https://spinnaker.io/docs/setup/other_config/spin/
curl -LO https://storage.googleapis.com/spinnaker-artifacts/spin/$(curl -s https://storage.googleapis.com/spinnaker-artifacts/spin/latest)/darwin/amd64/spin
chmod +x spin
sudo mv spin /usr/local/bin/spin

Follow specific configuration instructions depending on the authentication method against the backend.

https://spinnaker.io/docs/setup/other_config/spin/#configure-spin

Options

-k|--insecure

Ignore certificate errors.

Operations

spin -k application list

Application Operations

Create an Application

Create and Configure an Application

Configure an Application

Create and Configure an Application

Pipeline Operations

List Pipelines

spin [-k] pipeline list --application my-application

Create a Pipeline

Create a Pipeline from the UI

Create a Deployment Pipeline from the UI

Create a Pipeline from Command Line with spin

Create Pipeline from Command Line with spin

Create a Pipeline from Template

Create a Pipeline from Template

Executing a Pipeline

Executing a Pipeline in Command Line

Executing a Pipeline in Command Line

Delete a Pipeline

spin pipeline delete --name my-pipeline --application my-application

Insert a Stage into an Existing Pipeline

Use the JSON representation. Select the pipeline → Pipeline Actions → Edit as JSON → identity "stages" and introduce the JSON representation of the stage.

Update the refId, otherwise you'll get "Error: The refId property must be unique across stages. Duplicate id(s): 5".

Also update the requisiteStageRefIds, otherwise you'll get the stage inserted after the wrong stage.

Update the requisiteStageRefIds of the stage that follows.

{
      "name": "BreakPoint",
      "refId": "5",
      "requisiteStageRefIds": [
        "4"
      ],
    },

Copy and Paste a Pipeline as JSON

  • Create an empty pipeline.
  • Go to the source pipeline → Configure → Pipeline Actions → Edit as JSON
  • Copy the content of "stages" and paste.
    • Update stages accordingly.
    • ⚠️ Search for "moniker" and replace the value with the value of the application name:
{
  [...]
  "stages": [
    {
      [...]
      "moniker": {
        "app": "my-app-name"
      },
   [...]
  ]
}
  • If necessary, copy the content of "parameterConfig" and paste.

Pipeline Template Operations

Pipeline Template Operations

Blue-Green Deployments with Spinnaker

Blue-Green Deployments with Spinnaker

Running an Arbitrary Script

Running Arbitrary Functionality in a Pipeline Stage

Log Management

TO INVESTIGATE: