{"id":13550056,"url":"https://github.com/GoogleCloudPlatform/spinnaker-for-gcp","last_synced_at":"2025-04-02T23:31:36.772Z","repository":{"id":39737667,"uuid":"190032568","full_name":"GoogleCloudPlatform/spinnaker-for-gcp","owner":"GoogleCloudPlatform","description":"Production-ready Spinnaker on GKE","archived":false,"fork":false,"pushed_at":"2024-05-04T11:56:08.000Z","size":619,"stargazers_count":177,"open_issues_count":41,"forks_count":133,"subscribers_count":28,"default_branch":"master","last_synced_at":"2025-03-30T15:43:41.399Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GoogleCloudPlatform.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-03T15:29:11.000Z","updated_at":"2025-03-19T22:28:13.000Z","dependencies_parsed_at":"2024-03-16T22:01:01.656Z","dependency_job_id":"c35c1fb0-06c1-4b68-a298-2672e8900098","html_url":"https://github.com/GoogleCloudPlatform/spinnaker-for-gcp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fspinnaker-for-gcp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fspinnaker-for-gcp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fspinnaker-for-gcp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GoogleCloudPlatform%2Fspinnaker-for-gcp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GoogleCloudPlatform","download_url":"https://codeload.github.com/GoogleCloudPlatform/spinnaker-for-gcp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246911049,"owners_count":20853652,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T12:01:28.495Z","updated_at":"2025-04-02T23:31:36.024Z","avatar_url":"https://github.com/GoogleCloudPlatform.png","language":"Shell","funding_links":[],"categories":["Shell"],"sub_categories":[],"readme":"# Install and manage Spinnaker on Google Cloud Platform\n\nSpinnaker on Google Cloud Platform is a tool for easily installing a production-ready instance of Spinnaker, and for managing that instance over time.\n\n## Do I want to use this solution?\n\nThis solution is for…\n\n* Anyone who wants an easy path to install open-source Spinnaker, in a\nproduction-ready configuration, on Google Cloud Platform\n\n* Anyone who wants to \"kick the tires\" of Spinnaker, to decide if it's the right\nCD solution for their needs\n\n* Administrators who will manage one or more long-running instances of\nSpinnaker, including adding additional administrators, adding accounts,\nupgrading, and so on\n\nThis solution gives you...\n\n* Google recommendations and best practices for installing and running Spinnaker\non GCP\n\n* Pre-integration with many other services that Spinnaker is commonly used with\n\n* Sample applications and other helpers for a smoother experience\n\n\n## What is this solution?\n\nSpinnaker for Google Cloud Platform is a solution for installing and managing\nSpinnaker on Google Cloud Platform. It consists of an installation and\nmanagement console, Spinnaker and its microservices, and sample applications.\n\n### What is Spinnaker?\n\nSpinnaker is an open source, multi-cloud continuous delivery platform for\nreleasing software changes with high velocity and confidence.\n\nIf you would like to learn more about Spinnaker, please visit the\n[Spinnaker website](https://www.spinnaker.io).\n\n### What is Deck?\n\nDeck is the Spinnaker UI. You access Deck in one of the following ways:\n\n* Via port forwarding\n\n  The management console provides a command for forwarding port 8080, and a\n  button to click to access Deck via that port.\n\n* Over the internet, on a publicly available domain\n\n  This domain is secured with [Identity-Aware Proxy](https://cloud.google.com/iap).\n\n### The management console\n\nThe management console makes it easy for you to do the following:\n\n* Install Spinnaker\n\n  Spinnaker for Google Cloud Platform makes it easy to get a working version of\n  open-source Spinnaker running on Google Kubernetes Engine. After it's\n  installed, you can make it available to your users. The installation flow\n  begins in the management console after you start the solution.\n\n* Manage Spinnaker\n\n  Use this same management console to manage/operate your Spinnaker\n  installation, including adding administrators, and creating accounts for\n  deploying to additional GKE clusters or other providers.\n\n  The management flow begins after you finish installing Spinnaker. You can also\n  open it directly via a link from the GKE Applications page in the Google Cloud\n  Console.\n\nThe management console uses Cloud Shell, with instructions shown in a guide on\nthe right-hand side of the window. The guide shows the commands that will be\nrun, and you can click those commands to copy them into Cloud Shell and run them\nthere.\n\n### What is Cloud Shell?\n\n[Cloud Shell](https://cloud.google.com/shell) is a tool in Google Cloud Platform\nthat provides command-line access to GCP.\n\n### How do I find and restore the instructions?\n\n* If the instructions in the right-hand pane disappear, just enter the following\ncommand in Cloud Shell:\n\n```bash\ncloudshell launch-tutorial ~/spinnaker-for-gcp/scripts/install/provision-spinnaker.md\n```\n\n* If you need to find your way back to the management console, you can relaunch\nit by following the instructions under Install Spinnaker on Google Cloud\nPlatform.\n\n* Refer back to this document if you get lost.\n\n## Am I billed for this?\n\nYou are billed for Google Cloud Platform resources that are installed as part of\nSpinnaker for Google Cloud Platform.\n\n* [Google Kubernetes Engine](https://cloud.google.com/kubernetes-engine/)\n* [Cloud Memorystore for Redis](https://cloud.google.com/memorystore/docs/redis/)\n* [Google Cloud Load Balancing](https://cloud.google.com/load-balancing/)\n\n...and possibly other resources, depending on the options you select when you\ninstall and configure Spinnaker. You can use the [Google Cloud Platform Pricing\nCalculator](https://cloud.google.com/products/calculator/) to estimate the cost\nof this solution.\n\n[Learn more about Google Cloud pricing](https://cloud.google.com/pricing/) \u0026\n[free trial](https://cloud.google.com/developers/startups/).\n\n## Install and use Spinnaker on Google Cloud Platform\n\nYou access this solution by clicking the **Go to Spinnaker for Google Cloud\nPlatform** button on the [Spinnaker for GCP \npage](https://console.cloud.google.com/marketplace/details/google-cloud-platform/spinnaker)\nin Marketplace.\n\nAfter you've installed Spinnaker for Google Cloud Platform, you can access\nSpinnaker and the management console from [Google Cloud\nConsole](https://console.cloud.google.com/kubernetes/application).\n\n\u003e Note: Spinnaker for Google Cloud Platform doesn't support regional clusters.\n\u003e If you intend to [install Spinnaker on an existing\n\u003e cluster](#install_spinnaker_on_existing_cluster), it must be zonal.\n\n\u003e Note: Google recommends that you deploy your resources using an account other\n\u003e than `spinnaker-install-account`. That account is used to install your\n\u003e spinnaker instance, and resources deployed using that account are installed\n\u003e into the spinnaker namespace by default. This namespace is not indexed, so\n\u003e your deployments will time out before they are deemed stable.\n\n### Install Spinnaker on Google Cloud Platform\n\n1. Start the solution from the [Spinnaker for GCP Marketplace\npage](https://console.cloud.google.com/marketplace/details/google-cloud-platform/spinnaker)\nby clicking the **Go to Spinnaker for Google Cloud Platform** button.\n\n1. When prompted to Open in Cloud Shell, click **Proceed**.\n\n  Cloud Shell opens, along with a file tree showing the files in the Spinnaker\n  repository, and instructions.\n\n![The management console](resources/initial_mgmt_console.png)\n\n  \u003e **Important:** If you've launched the management console at least once before,\n  \u003e you might be prompted, in the shell, to resume with the clone you created\n  \u003e before, update that clone, or clone a new copy of the repository. The first\n  \u003e option is best (`cd` into the existing directory). Don't clone a new copy.\n\n  The spinnaker-for-gcp repository is cloned into your Cloud Shell.\n\n1. Follow the instructions shown on the screen.\n\nThe flow in the management console guides you through the installation process,\npresenting you with commands, which you can copy to the Cloud Shell prompt and\nthen execute by pressing **Enter**. The commands run scripts that automate the\nprocess of installing Spinnaker on GKE.\n\nIf the instruction pane disappears at any time, you can restore it using the\nfollowing command, from Cloud Shell:\n\n```bash\ncloudshell launch-tutorial ~/spinnaker-for-gcp/scripts/install/provision-spinnaker.md\n```\n\n### Access Spinnaker\n\nAfter you've installed Spinnaker, you can execute a command to forward ports,\nwhich allows you to access the Deck UI and start using Spinnaker. You can share\nthe port-forwarding command with your users, and if they have access to the GKE\ncluster, they can reach Deck (the Spinnaker UI) on port 8080.\n\nAlternatively, you can expose Spinnaker over the public internet, secured using\n[Identity-Aware Proxy](https://cloud.google.com/docs/ci-cd/spinnaker/spinnaker-for-gcp#expose_iap).\n\nBoth alternatives are described below.\n\n#### Access Spinnaker by forwarding ports\n\nYou can run a command in Cloud Shell in the management console, to forward ports\nso you can access Spinnaker from localhost:8080.\n\n1. Click to copy the `connect_unsecured.sh` command in the management console,\nand press **Enter**.\n\n  This forwards the local port 8080 to port 9000 (the port Deck uses) on the pod\n  running Deck.\n\n1. Click the \"Connect to Spinnaker…\" link. This highlights the Preview button.\n\n1. Click the highlighted preview button, and select **Preview on port 8080**.\n\n![Click to preview on port 8080](resources/preview_on_8080.png)\n\n  \u003e **Note:**There is a \"Connect to Spinnaker\" link displayed. If you click it,\n  \u003e it highlights the preview button, which you then click to select the port.\n\nDeck, the Spinnaker user interface, opens in your browser. The Spinnaker\ndocumentation site has instructions for using Spinnaker.\n\nBack in the management console, there are a few other things you can do:\n\n* Make Spinnaker securely available to your teams without having to forward\nports\n* View the Spinnaker audit log\n* View logs from Spinnaker microservices\n* Click **Next** to move on to the Spinnaker management portion of the solution.\n* Share the port-forwarding command with your users If they have access to the\nGKE cluster, they can reach Deck (the Spinnaker UI) on port 8080.\n\n### Give your users access to Spinnaker over the internet\n\nThe console includes a command that helps you create a secure endpoint from\nwhich to expose Spinnaker to your users, securely, over the internet.\n\n\u003e **Note:** If you need to keep Spinnaker private, you can set up port\n\u003e forwarding for your users. \n\n1. Navigate to step 2 of the installation flow in the Management console\n(\"Connect to Spinnaker\").\n\n1. Under \"Expose Spinnaker publicly,\" click the button to copy the command to\nthe command line, and press **Enter**.\n\n  The script creates a new endpoint from which to serve your Spinnaker instance.\n  After the script finishes, the guidance in the console changes to show\n  instructions for setting up OAuth so that your users can access this endpoint.\n\n1. Follow those on-screen instructions.\n\n  Make sure when you create your OAuth credentials that you copy the generated\n  client ID and secret. You'll need to provide them when prompted by the script.\n\n\u003e **Note:** This process can take up to an hour, even if it appears that the\n\u003e script has finished.\n\nYou now have a Spinnaker endpoint that you can share with your users, who\nauthenticate into it using OAuth2. A link to Spinnaker is displayed in the\nmanagement console. There is also a link on the GKE applications page for this\nSpinnaker instance.\n\n### Manage Spinnaker\n\nUse the management console to manage your spinnaker instance, including the\nfollowing actions:\n\n* Add administrators (operators)\n\n* Add cloud provider accounts\n\n  A provider is the cloud environment (for example, Google Compute Engine) where\n  you deploy your applications\n\n* Upgrade Spinnaker\n\n* Invoke Halyard commands to configure Spinnaker\n\n* Invoke spin commands to manage Spinnaker resources, like applications and\npipelines\n\n1. Access the management portion of this console.\n\n   Use one of the following options:\n\n   **If the console is already open:**\n\n   1. At the end of the installation flow, click **Next**.\n\n   1. Copy the command on the Next steps page and press **Enter**.\n\n      The instructions pane changes to start the management process.\n\n      ![Start managing Spinnaker from within the console](resources/start_management_pane.png)\n\n   **If the console is not already open:**\n\n   1. Go to the Google Kubernetes Engine applications page.\n\n   1. Open the Spinnaker application.\n\n      The application description includes a link: Open Management Environment\n      in Cloud Shell.\n\n   1. Click that link to open the management console, which now starts with the\n   management/admin functionality.\n\n      ![Start managing Spinnaker from the GKE Applications page](resources/open_tool_from_gke_application.png)\n\n   1. Select your GCP project, and click Start.\n\n#### Add administrators for your Spinnaker instance\n\nYou can give access to more operators, who can then use the management console.\n\n1. On the [IAM permissions page](https://console.developers.google.com/iam-admin/iam),\ngrant the person the 'Owner' role on the GCP project where you've installed Spinnaker.\n\n1. If you are serving Spinnaker on an IAP-secured endpoint, and if the person to \nwhom you're giving operator rights doesn't already have *user* access, use the\nfollowing command (which is also on step 5 of the management part of the\nconsole):\n\n   ```bash\n   ~/spinnaker-for-gcp/scripts/manage/grant_iap_access.sh\n   ```\n\n   ...and follow the instructions on the Cloud Shell command line.\n\n#### Add cloud provider accounts\n\nYou can use the management console to add accounts for as many cloud providers\n[as Spinnaker supports](https://www.spinnaker.io/setup/install/providers/).\nYou'll need one for each cloud on which your users intend to deploy\napplications. For example, if they will deploy applications to Google Compute\nEngine and AWS, you'll add a provider account for each.\n\nThe management console includes the following command, for adding a GKE account:\n\n`~/spinnaker-for-gcp/scripts/manage/add_gke_account.sh`\n\nAnd for Google Compute Engine:\n\n`~/spinnaker-for-gcp/scripts/manage/add_gce_account.sh`\n\nAnd for Google App Engine:\n\n`~/spinnaker-for-gcp/scripts/manage/add_gae_account.sh`\n\nYou can run these commands from the management console or enter them in Cloud\nShell against an existing Spinnaker instance.\n\n#### Run Halyard commands\n\nYou can invoke [any hal command](https://www.spinnaker.io/reference/halyard/commands)\nto configure and administer your Spinnaker installation.\n\nTo do so, just invoke the command from the Cloud Shell in the management\nconsole, *after* you've installed Spinnaker\n\n#### Upgrade Spinnaker\n\n1. Find out the version you want to upgrade to.\n\n   The [Versions page](https://www.spinnaker.io/community/releases/versions)\n   lists the stable versions available.\n\n1. In the console, navigate to the management flow:\n\n   `~/spinnaker-for-gcp/scripts/manage/update_console.sh`\n\n1. Click **Next** until you see the screen titled \"Scripts for Common Commands.\"\n\n1. Under \"Upgrade Spinnaker,\" copy the first command to the shell, and press\n**Enter**.\n\n   That command is...\n\n   ```bash\n   cloudshell edit \\\n    ~/spinnaker-for-gcp/scripts/install/properties\n    ```\n\n1. Edit the Spinnaker version in the `properties` file that is displayed.\n\n   ```bash\n   export SPINNAKER_VERSION=1.19.3\n   ```\n\n   The [Spinnaker Versions page](https://www.spinnaker.io/community/releases/versions)\n   shows the latest versions avaiable.\n\n1. Use the following command to invoke Halyard to apply the changes:\n\n   ```bash\n   ~/spinnaker-for-gcp/scripts/manage/update_spinnaker_version.sh\n   ```\n\n## Restart the management console\n\nIf you need to restart the console for any reason (for example, you closed the\ntab or window), you can restart it in the same way that you\n[started it](https://console.cloud.google.com/marketplace/details/google-cloud-platform/spinnaker).\nYou can also launch it from the [GKE Applications\npage](https://console.cloud.google.com/kubernetes/application) in the Google\nCloud Console, if you've previously installed Spinnaker for Google Cloud\nPlatform.\n\nWhen you restart the console, it prompts you to resume from where you left off, if you want.\n\n\n## Upgrade the management console\n\n1. In the management console, navigate to step 3, \"Scripts for Common Command,\"\nand scroll to the bottom of the page.\n\n1. Run the command shown under \"Upgrade Management Environment.\"\n\nThe management console is upgraded to include the latest changes.\n\n## Remove Spinnaker for Google Cloud Platform\n\n\u003e **Warning:** If you installed Spinnaker on pre-existing infrastructure (GKE\n\u003e cluster, Redis, service accounts), this script deletes those items. If you\n\u003e want to keep them, edit the generated cleanup script\n\u003e (`~/spinnaker-for-gcp/scripts/manage/generate_deletion_script.sh`) to comment\n\u003e out the specific deletion commands for items you want to keep.\n\nIf you want to remove Spinnaker for any reason:\n\n1. Open the management console and click Next until you get to the \"Delete\nSpinnaker\" page.\n\n1. Copy the command to the Cloud Shell terminal, and press **Enter**.\n\nAll resources that were created for this Spinnaker instance, and any existing\nresources on which you might have deployed, are deleted.\n\n## Sample Applications\n\nThe Spinnaker for Google Cloud Platform solution comes with sample applications\nto help you get started with Spinnaker.\n\nTo install them:\n\n1. In the management console, click **Next** until you get to the step titled\n\"Use Spinnaker.\"\n\n1. Under **Install sample applications and pipelines**, click the button to\npaste the command, and press **Enter**.\n\n   Cloud Shell returns a list of available sample apps, numbered.\n\n1. Press the number corresponding to the application you want, or the number\ncorresponding to \"Quit\" to exit without installing any.\n\n1. Press Enter\n\n   The tutorial pane now displays guidance for the sample application.\n\n1. To exit the sample app and return to the management portion of the console,\nclick **Start** and then **Next**, then scroll to the bottom of the \"Start a new\nbuild\" page, and run the command under \"Return to Spinnaker console.\"\n\n## Other considerations\n\n### Spinnaker for GCP architecture\n\nSpinnaker and its microservices are installed on GKE using the following\narchitecture:\n\n![Architecture of Spinnaker on GCP](resources/spinnaker-k8s-app-architecture.png)\n\n### Install Spinnaker on an existing cluster\n\nYou can install your Spinnaker instance or instances on pre-existing\ninfrastructure, instead of having this solution create it new.\n\nThe cluster must have the following:\n\n* IP aliases enabled, because this uses a hosted Redis instance\n\n* Full Cloud Platform scope for its nodes if you're using the project default\nservice account\n\nBefore you run the installation script, do the following:\n\n1. Copy and run the following command (which is also available in step 1 of the\ninstallation flow):\n\n   ```bash\n   cloudshell edit \\\n       ~/spinnaker-for-gcp/scripts/install/properties\n   ```\n\n   The properties file is opened in the file editor.\n\n1. Edit this section of the `properties` file to identify the Kubernetes cluster\non which to install Spinnaker:\n\n   ```bash\n   # If cluster does not exist, it will be created.\n   export GKE_CLUSTER=$DEPLOYMENT_NAME\n   export ZONE=us-west1-b\n   export REGION=us-west1\n   ```\n\n1. Similarly, edit other properties to identify other existing infrastructure\nand accounts that you want to use, if applicable.\n\n   For example an existing Cloud Memorystore Redis instance, or a bucket or a\n   service account. In each case, if the infrastructure doesn't exist, the\n   installation script creates it for you.\n\n### Manage multiple Spinnaker installations\n\nIf you run multiple Spinnaker instances, they must be on separate clusters, and therefore in different Kubernetes contexts.\n\n\u003e **Important:** If you're trying to install multiple Spinnaker instances, don't\nclone multiple copies of the spinnaker-for-gcp repo.\n\nTo manage one of those installations:\n\n1. Get your credentials.\n\n   ```bash\n   gcloud container get-credentials\n   ```\n\n1. Switch to the appropriate Kubernetes context.\n\n   ```bash\n   kubectl config use-context \u003cCONTEXT_NAME\u003e\n   ```\n\n1. Pull the configuration stored in that cluster.\n\n   ```bash\n   ~/spinnaker-for-gcp/scripts/manage/pull_config.sh\n   ```\n\nThe config now in `~/spinnaker-for-gcp/scripts/install/properties` is the one\nfor that Spinnaker instance. Perform the usual management tasks available to\nyou, including running `hal` commands. Spinnaker applies those commands to the\nSpinnaker instance in the chosen context.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGoogleCloudPlatform%2Fspinnaker-for-gcp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FGoogleCloudPlatform%2Fspinnaker-for-gcp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FGoogleCloudPlatform%2Fspinnaker-for-gcp/lists"}