### Plugin loading log output Source: https://spinnaker.io/docs/guides/developer/plugin-creator/testing/plugin-deck-test Example log statements showing that a plugin has been resolved and started by the AbstractPluginManager. ```text INFO 90843 --- [main] org.pf4j.AbstractPluginManager: [] Plugin 'Armory.RandomWaitPlugin@unspecified' resolved INFO 90843 --- [main] org.pf4j.AbstractPluginManager: [] Start plugin 'Armory.RandomWaitPlugin@unspecified' INFO 90843 --- [main] i.a.p.s.wait.random.RandomWaitPlugin: [] RandomWaitPlugin.start() ``` -------------------------------- ### Install Jenkins and Git Source: https://spinnaker.io/docs/guides/tutorials/codelabs/hello-deployment Commands to install OpenJDK, Jenkins, and Git on your instance. ```bash sudo apt-get update sudo apt-get upgrade sudo apt-get install openjdk-8-jdk wget -q -O - https://pkg.jenkins.io/debian/jenkins.io.key | sudo apt-key add - sudo sh -c 'echo deb https://pkg.jenkins.io/debian binary/ > /etc/apt/sources.list.d/jenkins.list' sudo apt-get update sudo apt-get install jenkins git ``` -------------------------------- ### Install and configure Nginx Source: https://spinnaker.io/docs/guides/tutorials/codelabs/hello-deployment Commands to install Nginx and open the default site configuration file. ```bash sudo apt-get install nginx sudo vim /etc/nginx/sites-enabled/default ``` -------------------------------- ### CI service implementation example Source: https://spinnaker.io/docs/guides/developer/extending/integrate-your-ci A skeleton example of implementing the CiBuildService interface for a custom CI provider. ```java public class SomeCiService implements CiBuildService[...] ``` -------------------------------- ### Install and configure kubectl and aws-iam-authenticator Source: https://spinnaker.io/docs/setup/install/providers/kubernetes/aws-eks Downloads and installs kubectl and aws-iam-authenticator, verifies their installation with help commands. The commands return help information for both tools; if help is not returned, verify installation. ```bash # Download and install kubectl curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl chmod +x ./kubectl sudo mv ./kubectl /usr/local/bin/kubectl # Verify the installation of kubectl kubectl help # Download and install aws-iam-authenticator curl -o aws-iam-authenticator https://amazon-eks.s3-us-west-2.amazonaws.com/1.13.7/2019-06-11/bin/linux/amd64/aws-iam-authenticator chmod +x ./aws-iam-authenticator mkdir -p $HOME/bin && cp ./aws-iam-authenticator $HOME/bin/aws-iam-authenticator && export PATH=$HOME/bin:$PATH echo 'export PATH=$HOME/bin:$PATH' >> ~/.bashrc #Verify the installation of aws-iam-authenticator aws-iam-authenticator help ``` -------------------------------- ### Orca startup success log Source: https://spinnaker.io/docs/guides/developer/plugin-creator/testing/plugin-deck-test Example of the log output indicating that the Orca service has started successfully. ```text INFO 18111 --- [main] com.netflix.spinnaker.orca.Main: [] Started Main in 11.123 seconds (JVM running for 11.933) ``` -------------------------------- ### Configure services to use SQL (mariadb example) Source: https://spinnaker.io/docs/setup/install/storage YAML configuration for enabling SQL in Spinnaker services when not using the native mariadb component in kustomize. Example shows connection pools and migration settings for fiat. The default spinnaker-kustomize installation auto-injects these configurations. ```yaml sql: enabled: true connectionPools: default: default: true # additional connection pool parameters are available here, # for more detail and to view defaults, see: # https://github.com/spinnaker/kork/blob/master/kork-sql/src/main/kotlin/com/netflix/spinnaker/kork/sql/config/ConnectionPoolProperties.kt jdbcUrl: jdbc:mysql://mariadb:3306/fiat user: fiat_service password: ${FIAT_MARIADB} migration: jdbcUrl: jdbc:mysql://mariadb:3306/fiat user: fiat_migrate password: ${FIAT_MARIADB} ``` -------------------------------- ### Install Halyard on Debian/Ubuntu Source: https://spinnaker.io/docs/setup/install/halyard Runs the downloaded installation script. Default answers are usually suitable if prompted. ```bash sudo bash InstallHalyard.sh ``` -------------------------------- ### Start Nginx service Source: https://spinnaker.io/docs/guides/tutorials/codelabs/hello-deployment Command to start the Nginx service. ```bash sudo service nginx start ``` -------------------------------- ### Create Aptly Repository Source: https://spinnaker.io/docs/guides/tutorials/codelabs/hello-deployment Initialize a new Aptly repository named 'hello'. ```bash ./aptly repo create hello ``` -------------------------------- ### Check Azure CLI version Source: https://spinnaker.io/docs/setup/install/providers/azure Check that the Azure CLI 2.0 is installed before proceeding with the setup steps. ```bash az --version ``` -------------------------------- ### ChapService interface definition Source: https://spinnaker.io/docs/community/contributing/code/developer-guides/extending/new-stage Retrofit REST client interface for the ChAP service. Defines endpoints for starting, getting, and canceling runs. ```java package com.netflix.spinnaker.orca.chap; import retrofit.http.Body; import retrofit.http.GET; import retrofit.http.POST; import retrofit.http.Path; import java.util.Map; public interface ChapService { @POST("/v1/runs") Run startChap(@Body Map params); @GET("/v1/runs/{id}") Run getChap(@Path("id") String id); @POST("/v1/runs/{id}/stop") Run cancelChap(@Path("id") String id, @Body String body); } ``` -------------------------------- ### Install Aptly Source: https://spinnaker.io/docs/guides/tutorials/codelabs/hello-deployment Download and prepare the Aptly binary in the Jenkins user home directory. ```bash sudo su - jenkins cd ~ wget https://dl.bintray.com/smira/aptly/0.9.5/debian-squeeze-x64/aptly chmod +x aptly ``` -------------------------------- ### Example User Data Template with Tokens Source: https://spinnaker.io/docs/setup/other_config/features/user-data Uses replacement tokens like %%account%% and %%env%% in a template file. These tokens are replaced with deployment-specific values during instance launch. ```plaintext CLOUD_ACCOUNT="%%account%%" CLOUD_ACCOUNT_TYPE="%%accounttype%%" CLOUD_ENVIRONMENT="%%env%%" CLOUD_SERVER_GROUP="%%group%%" CLOUD_CLUSTER="%%cluster%%" CLOUD_STACK="%%stack%%" CLOUD_DETAIL="%%detail%%" CLOUD_REGION="%%region%%" ``` -------------------------------- ### userInfoRequirements configuration example Source: https://spinnaker.io/docs/setup/other_config/security/authentication/oauth Restricts user access based on user info attributes. Values starting and ending with '/' are interpreted as regular expressions. ```yaml security: authn: oauth2: userInfoRequirements: hd: your-org.net batz: /^Sample.*Regex/ foo: bar ``` -------------------------------- ### Deploy using Kustomize Source: https://spinnaker.io/docs/setup/install/migration-to-kustomize-automation Apply the Kustomize configurations to the cluster. ```bash kubectl apply -f <(kustomize build ./overlays/prod) ``` -------------------------------- ### GitHub token encrypted in config Source: https://spinnaker.io/docs/reference/secrets Example of replacing a GitHub token in a Spinnaker config with the encrypted syntax. Spinnaker reads these secrets at start time. ```yaml ... github: enabled: true accounts: - name: github token: encrypted:!:!:!... ... ``` -------------------------------- ### Example repositories.json with multiple plugin repositories Source: https://spinnaker.io/docs/guides/user/plugins-users Example repositories.json file defining three plugin repositories. Use this format when you want a single plugin repository entry to point to multiple plugins.json files. ```json [ { "id": "spinnaker-plugin-examples", "url": "https://raw.githubusercontent.com/spinnaker-plugin-examples/examplePluginRepository/master/plugins.json" }, { "id": "my-company-internal-plugins", "url": "https:////plugins.json" }, { "id": "my-plugins", "url": "https://github.com/aimeeu/pluginRepository/blob/master/plugins.json" } ] ``` -------------------------------- ### Pub/Sub trigger message with id field Source: https://spinnaker.io/docs/guides/user/pipeline/searching Example JSON payload for a Pub/Sub message that includes an 'id' field with a GUID. This field is used later to search for pipelines triggered by this message. ```json { "id": "9c3036f6-3791-47eb-bb69-30983acb00be" } ``` -------------------------------- ### Check ingress and get address Source: https://spinnaker.io/docs/setup/install/deploy Run this command to list the ingress in the spinnaker namespace and obtain the external address. The example output shows a typical ingress with host spinnaker.example.com and address 192.168.1.2. ```bash kubectl get ingress --namespace spinnaker ``` ```text NAME CLASS HOSTS ADDRESS PORTS AGE spinnaker-ingress nginx spinnaker.example.com 192.168.1.2 80, 443 644d ``` -------------------------------- ### IAM role policy for CodeBuild permissions Source: https://spinnaker.io/docs/setup/other_config/ci/codebuild This JSON policy grants the IAM role permissions to stop, list, start, and get builds for AWS CodeBuild. Attach this policy to the IAM role that Spinnaker will assume. ```json { "Version": "2012-10-17", "Statement": [ { "Effect": "Allow", "Action": [ "codebuild:StopBuild", "codebuild:ListProjects", "codebuild:StartBuild", "codebuild:BatchGetBuilds" ], "Resource": "*" } ] } ``` -------------------------------- ### Run external_service_setup.sh script Source: https://spinnaker.io/docs/guides/developer/plugin-creator/testing/plugin-deck-test Execute this script to configure Minnaker to expect Orca and Deck as external services. ```bash ./minnaker/scripts/utils/external_service_setup.sh orca deck ``` -------------------------------- ### Create database and grants for front50 Source: https://spinnaker.io/docs/setup/install/storage SQL commands to create a database and user grants for a Spinnaker service (example uses front50). Repeat for echo, orca, clouddriver, fiat, front50, and keel if used, replacing the database name. Grants are not automatically created when services start. ```sql CREATE DATABASE `front50` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, EXECUTE, SHOW VIEW ON `front50`.* TO 'front50_service'@'%' IDENTIFIED BY "password"; GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, LOCK TABLES, EXECUTE, SHOW VIEW ON `front50`.* TO 'front50_migrate'@'%' IDENTIFIED BY "password"; ``` -------------------------------- ### Create Pub/Sub subscription for cloud-builds topic Source: https://spinnaker.io/docs/setup/other_config/ci/gcb Creates a Pub/Sub subscription for the cloud-builds topic. Set PROJECT_ID and SUBSCRIPTION_NAME first. ```bash PROJECT_ID= SUBSCRIPTION_NAME=spinnaker-cloud-build gcloud pubsub subscriptions create $SUBSCRIPTION_NAME \ --topic projects/$PROJECT_ID/topics/cloud-builds \ --project $PROJECT_ID ``` -------------------------------- ### Install Halyard Source: https://spinnaker.io/docs/guides/tutorials/codelabs/appengine-source-to-prod Downloads and installs Halyard, the tool for configuring, installing, and updating Spinnaker. ```bash curl -O https://raw.githubusercontent.com/spinnaker/halyard/master/install/debian/InstallHalyard.sh sudo bash InstallHalyard.sh ``` -------------------------------- ### Package application as a tarball Source: https://spinnaker.io/docs/guides/tutorials/codelabs/pubsub-to-appengine Navigates to the hello_world directory and creates a tar archive of the application files. ```bash cd python-docs-samples/appengine/standard/hello_world; tar -cvf app.tar * ``` -------------------------------- ### Install spin on Linux Source: https://spinnaker.io/docs/setup/other_config/spin Downloads the latest spin binary for Linux amd64, makes it executable, and moves it to /usr/local/bin. ```bash curl -LO https://storage.googleapis.com/spinnaker-artifacts/spin/$(curl -s https://storage.googleapis.com/spinnaker-artifacts/spin/latest)/linux/amd64/spin chmod +x spin sudo mv spin /usr/local/bin/spin ``` -------------------------------- ### Install Ruby and Bundler for deb-s3 Source: https://spinnaker.io/docs/guides/tutorials/codelabs/hello-deployment Install Ruby and bundler on the Jenkins server to prepare for deb-s3 installation. ```bash sudo apt-get install software-properties-common sudo apt-add-repository ppa:brightbox/ruby-ng sudo apt-get update sudo apt-get install build-essential ruby2.2 ruby2.2-dev zlib1g-dev liblzma-dev sudo gem install bundler ``` -------------------------------- ### Example property file content Source: https://spinnaker.io/docs/guides/user/pipeline/expressions A sample property file content defining a version variable. ```text version='0.1.0' ``` -------------------------------- ### Install awscli Source: https://spinnaker.io/docs/setup/install/providers/kubernetes/aws-eks Installs the AWS CLI using apt and verifies the installation by checking the version. The command returns the awscli version. ```bash # Install the awscli sudo apt install python-pip awscli # Verify the installation aws --version ``` -------------------------------- ### Initialize Gcloud CLI Source: https://spinnaker.io/docs/setup/install/providers/cloudrun Run to initialize the gcloud command-line tool. ```bash gcloud init ``` -------------------------------- ### Download Halyard installation script Source: https://spinnaker.io/docs/setup/install/halyard Downloads the latest Halyard installation script from the official repository. Run this before installing Halyard on Debian/Ubuntu. ```bash curl -O https://raw.githubusercontent.com/spinnaker/halyard/master/install/debian/InstallHalyard.sh ``` -------------------------------- ### Check Gcloud Installation Source: https://spinnaker.io/docs/setup/install/providers/cloudrun Verify that gcloud is installed and authenticated. ```bash gcloud info ``` -------------------------------- ### Console output after exposing services Source: https://spinnaker.io/docs/guides/developer/plugin-creator/testing/plugin-deck-test Sample output from the expose_local.sh script showing the pods and their statuses. Use this to verify that all services are running. ```text NAME READY STATUS RESTARTS AGE minio-0 1/1 Running 0 18h mariadb-0 1/1 Running 0 18h halyard-0 1/1 Running 0 18h spin-redis-664df6f896-b5px8 1/1 Running 0 18h svclb-spin-clouddriver-lcmrq 1/1 Running 0 10m svclb-spin-redis-24qf6 1/1 Running 0 10m svclb-spin-front50-8hchk 1/1 Running 0 10m svclb-spin-orca-9t89s 1/1 Running 0 10m svclb-spin-gate-gn6g5 1/1 Running 0 10m svclb-spin-deck-26vpf 1/1 Running 0 10m svclb-spin-echo-s6zdv 1/1 Running 0 10m svclb-spin-rosco-qwfhv 1/1 Running 0 10m spin-deck-55b88d5fb9-v2ngf 1/1 Running 0 10m spin-front50-8fd4f9459-fwpzc 1/1 Running 0 10m spin-rosco-6885b6df45-jqkl9 1/1 Running 0 10m spin-gate-75df95744b-7zvp5 1/1 Running 0 10m spin-orca-766f9bbf7b-cw9f7 1/1 Running 0 10m spin-echo-9bbcd9df8-td4rt 1/1 Running 0 10m spin-clouddriver-55bc94ddcc-4d7cd 1/1 Running 0 10m ``` -------------------------------- ### Create GCS bucket and authenticate Source: https://spinnaker.io/docs/guides/tutorials/codelabs/pubsub-to-appengine Sets environment variables for the bucket name and project ID, authenticates with gcloud, and creates the bucket. Replace and with your values. ```bash $ BUCKET_NAME=gs:// && PROJECT_ID= $ gcloud auth login $ gsutil mb -p $PROJECT_ID $BUCKET_NAME ``` -------------------------------- ### View spin application help Source: https://spinnaker.io/docs/guides/spin/app Displays the available commands and flags for the spin application CLI. ```bash $ spin application Usage: application [command] Aliases: application, applications, app Available Commands: delete Delete the specified application get Get the specified application list List the all applications save Save the provided application Flags: -h, --help help for application Global Flags: --config string path to config file (default $HOME/.spin/config) --gate-endpoint string Gate (API server) endpoint (default http://localhost:8084) -k, --insecure ignore certificate errors --no-color disable color (default true) --output string configure output formatting -q, --quiet squelch non-essential output Use " application [command] --help" for more information about a command. ``` -------------------------------- ### Get pipeline template details with spin pipeline-template get Source: https://spinnaker.io/docs/guides/user/pipeline/pipeline-templates/override Use the `spin pipeline-template get` command to examine the `pipeline` element of a template to see what features you can inherit or override. ```bash spin pipeline-template get --id ``` -------------------------------- ### Install deb-s3 Gem Source: https://spinnaker.io/docs/guides/tutorials/codelabs/hello-deployment Install the deb-s3 gem globally on the Jenkins server. ```bash sudo gem install deb-s3 ``` -------------------------------- ### Preview changes locally with Hugo Source: https://spinnaker.io/docs/community/contributing/docs/local-clone Run this command from the repository root to start a local Hugo server for previewing documentation changes. ```bash hugo server ```