{"__v":26,"_id":"56f2ce585501280e0086689f","category":{"__v":3,"_id":"56ce1e6ee538330b0021ac5d","pages":["56ce1ec2f3539413004711ee","56ce1edef3539413004711f1","56ce2072e538330b0021ac62"],"project":"55c6bec1b9aa4e0d0016c2c3","version":"55c6bec1b9aa4e0d0016c2c6","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2016-02-24T21:19:42.029Z","from_sync":false,"order":1,"slug":"tools","title":"Installation"},"parentDoc":null,"project":"55c6bec1b9aa4e0d0016c2c3","user":"56e1901aa71e9e200066cdf6","version":{"__v":8,"_id":"55c6bec1b9aa4e0d0016c2c6","project":"55c6bec1b9aa4e0d0016c2c3","createdAt":"2015-08-09T02:45:21.683Z","releaseDate":"2015-08-09T02:45:21.683Z","categories":["55c6bec2b9aa4e0d0016c2c7","56c14bc5826df10d00e82230","56cceed8723ad71d00cae46c","56ccf29a431ada1f00e85aae","56ccf3c28fa8b01b00b82018","56ce1e6ee538330b0021ac5d","56f97e9a4c612020008f2eaf","5734fafd146eb82000597261"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"updates":["56f98b21b0cb632200683789","570617fbe2df830e00d5277c","57575b028abb520e00ea7a00","575760bec60a290e0098a6ae","575764736a65ec0e00415160","57f7d6ac3ae2bf170084b882","58111c401cb1e80f00c403c0","588bc2ee71e51b3900e106d9","588be0dd5f12e40f009c5c87","589da263733e7a3d003b650e","58a5676d64506619000e7ade"],"next":{"pages":[],"description":""},"createdAt":"2016-03-23T17:11:52.215Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":2,"body":"Once you've setup your [Cloud provider environment](doc:target-deployment-setup) you are ready to install and run Spinnaker. Your choice of where to run Spinnaker does not affect your choice of deployment targets, but some of the hosted turn-key solutions are preconfigured to deploy to a limited set of platforms. This can be circumvented by reading how to [configure your target deployment environment](doc:target-deployment-configuration).\n\nOnce Spinnaker is installed and configured, you can test it out by creating a sample [bake and deploy pipeline](doc:bake-and-deploy-pipeline).\n\n## Spinnaker Components\n\nSpinnaker is composed of several microservices that provide each piece of the functionality of the system. \n\n\n[block:parameters]\n{\n  \"data\": {\n    \"0-0\": \"**Component Name** \",\n    \"0-1\": \"**Functionality**\",\n    \"0-2\": \"**Default Port**\",\n    \"1-0\": \"Deck\",\n    \"1-1\": \"User interface.\",\n    \"1-2\": \"9000\",\n    \"2-0\": \"Gate\",\n    \"2-1\": \"Api gateway. All external requests to Spinnaker are directed through Gate.\",\n    \"2-2\": \"8084\",\n    \"3-0\": \"Orca\",\n    \"3-1\": \"Orchestration of pipelines and ad hoc operations.\",\n    \"3-2\": \"8083\",\n    \"4-0\": \"Clouddriver\",\n    \"4-1\": \"Interacts with and mutates infrastructure on underlying cloud providers.\",\n    \"4-2\": \"7002\",\n    \"5-0\": \"Rosco\",\n    \"5-1\": \"Machine image bakery. A machine image is a static view of the state and disk of a machine that can be 'deployed' into a running instance. Representation varies by cloud provider.\",\n    \"5-2\": \"8087\",\n    \"6-0\": \"Front50\",\n    \"6-1\": \"Interface to persistent storage, such as Amazon S3 or Google Cloud Storage.\",\n    \"6-2\": \"8080\",\n    \"7-0\": \"Igor\",\n    \"7-1\": \"Interface to Jenkins. Can both listen to and fire Jenkins jobs and collect contextual job and build information.\",\n    \"7-2\": \"8088\",\n    \"8-0\": \"Echo\",\n    \"8-1\": \"Event bus for notifications and triggers. Triggers are things like git commits, Jenkins jobs finishing and other Spinnaker pipelines finishing. Notifications can send emails, slack notifications, SMS messages, etc.\",\n    \"8-2\": \"8089\"\n  },\n  \"cols\": 3,\n  \"rows\": 9\n}\n[/block]\nSpinnaker can be deployed on any target environment, and can manage infrastructure in any of the supported cloud providers. For instance, you can deploy your Spinnaker cluster to Google Cloud Platform, but manage infrastructure on Amazon Web Services and Kubernetes. Next, we'll step through the configuration for each of the supported target environments.\n\n## Installation Targets\n\n  * [Amazon Web Services](doc:creating-a-spinnaker-instance#section-amazon-web-services)\n  * [Azure](doc:creating-a-spinnaker-instance#section-azure) \n  * [Docker Compose](https://github.com/spinnaker/spinnaker/tree/master/experimental/docker-compose)\n  * [Cloud Foundry](doc:creating-a-spinnaker-instance#section-cloud-foundry)\n  * [Google Cloud Platform](doc:creating-a-spinnaker-instance#section-google-cloud-platform)\n  * [Kubernetes](doc:creating-a-spinnaker-instance#section-kubernetes)\n  * [Localhost](doc:creating-a-spinnaker-instance#section-localhost)\n\n### Amazon Web Services\n\nCreate an AWS virtual machine.\n\n1. Goto [AWS Console](https://console.aws.amazon.com) > AWS Identity & Access\n  Management > Roles.\n  * Click on **Create New Role**.\n  * Type \"spinnakerRole\" in the **Role Name** field. Hit **Next Step**.\n  * Click **Select** for the **Amazon EC2** service.\n  * Select the checkbox next to **PowerUserAccess**, then click\n    **Next Step**, followed by **Create Role**.\n  * Click on the role you created.\n  * Click on the **Inline Policies** header, then click the link to create an inline policy.\n  * Click **Select** for **Policy Generator**.\n  * Select **AWS Identity and Access Management** from the **AWS Service** pulldown.\n  * Select **PassRole** for **Actions**.\n  * Type <code>*</code> (the asterisk character) in the **Amazon Resource Name (ARN)** box.\n  * Click **Add Statement**, then **Next Step**.\n  * Click **Apply Policy**.\n  * Goto [AWS Console](https://console.aws.amazon.com) > EC2.\n  * Click **Launch Instance**.\n  * Click **Community AMIs** then\n  * If the default region where your resources were allocated in [Step 1](#step-1-set-up-your-target-deployment-environment) is <code>us-west-2</code>, click **Select** for the **Spinnaker-Ubuntu-14.04-42 - [ami-cfb87eaf](https://console.aws.amazon.com/ec2/home?region=us-west-2#launchAmi=ami-cfb87eaf)** image. Otherwise, consult [this region-to-AMI mapping table](http://www.spinnaker.io/docs/amazon-ami-ids) to identify an appropriate image to use.\n  * Under **Step 2: Choose an Instance Type**, click the radio button\n  for **m4.xlarge**, then click **Next: Configure Instance Details**.\n  * Set the **Auto-assign Public IP** field to **Enable**, and the **IAM\n  role** to \"spinnakerRole\".\n  * Click **Review and Launch**.\n  * Click **Launch**.\n  * Select the `my-aws-account-keypair` you created earlier.\n  * Click **View Instances**. Make note of the **Public IP** field for the newly-created instance. This will be needed in the next step.\n  * Note that it will take several minutes for Spinnaker post-configurations to complete.\n\n2. SSH in and upgrade Spinnaker.\n  ssh <Public DNS name of instance you just created>\n  Run the command sudo apt-get update then run sudo apt-get upgrade spinnaker\n\n3. Open an SSH tunnel from your host to the virtual machine.\n  * Add this to ~/.ssh/config\n\n          Host spinnaker-start\n            HostName <Public DNS name of instance you just created>\n            IdentityFile </path/to/my-aws-account-keypair.pem>\n            ControlMaster yes\n            ControlPath ~/.ssh/spinnaker-tunnel.ctl\n            RequestTTY no\n            LocalForward 9000 127.0.0.1:9000\n            LocalForward 8084 127.0.0.1:8084\n            LocalForward 8087 127.0.0.1:8087\n            User ubuntu\n\n          Host spinnaker-stop\n            HostName <Public DNS name of instance you just created>\n            IdentityFile </path/to/my-aws-account-keypair.pem>\n            ControlPath ~/.ssh/spinnaker-tunnel.ctl\n            RequestTTY no\n\n  * Create a spinnaker-tunnel.sh file with the following content, and give it execute permissions\n\n          #!/bin/bash\n\n          socket=$HOME/.ssh/spinnaker-tunnel.ctl\n\n          if [ \"$1\" == \"\" ]; then\n              echo \"Please run either ./spinnaker-tunnel.sh start or ./spinnaker-tunnel.sh stop\"\n          fi\n\n          if [ \"$1\" == \"start\" ]; then\n            if [ ! \\( -e ${socket} \\) ]; then\n              echo \"Starting tunnel to Spinnaker...\"\n              ssh -f -N spinnaker-start && echo \"Done.\"\n            else\n              echo \"Tunnel to Spinnaker running.\"\n            fi\n          fi\n\n          if [ \"$1\" == \"stop\" ]; then\n            if [ \\( -e ${socket} \\) ]; then\n              echo \"Stopping tunnel to Spinnaker...\"\n              ssh -O \"exit\" spinnaker-stop && echo \"Done.\"\n            else\n              echo \"Tunnel to Spinnaker stopped.\"\n            fi\n          fi\n\n  * Execute the script to start your Spinnaker tunnel\n\n          ./spinnaker-tunnel.sh start\n\n  * You can also stop your Spinnaker tunnel\n\n          ./spinnaker-tunnel.sh stop\n    \n  * Once you have started your Spinnaker tunnel, you can connect to Spinnaker in your browser using the address:\n\n          http://127.0.0.1:9000/\n \n### Azure\n\nFor quick and easy setup, deploy an [Azure Quickstart Template](https://aka.ms/azspinnaker). Otherwise, follow these steps:\n\n1.  Launch a virtual machine in Azure. See [Creating Linux virtual machines](https://azure.microsoft.com/en-us/documentation/services/virtual-machines/linux/) for more details.\n\n2.  Install Spinnaker on your virtual machine. For a Linux machine, execute the command:  <code>sudo bash -xc \"$(curl -s https://raw.githubusercontent.com/spinnaker/spinnaker/master/InstallSpinnaker.sh)\"</code>\n\n3.  If you are targeting a [Kubernetes cluster on Azure](https://aka.ms/azspinkubecreate), specify **none** as a cloud provider. If you are targeting VM Scale Sets on Azure, specify **azure** as a cloud provider and choose a default region where you will deploy resources.\n\n4.  Run the command <code>sudo apt-get update</code> then run <code>sudo apt-get upgrade spinnaker</code>\n\n5. Execute <code>curl http://localhost:9000</code> and verify you get a response.  Spinnaker is now installed and configured.\n\n6. Execute <code>curl http://localhost:8084/health</code> and verify you get a response.\n\n7. Configure SSH port forwarding on your local machine to test the setup.  For instructions for Linux see step 2 in the AWS docs here: [http://www.spinnaker.io/docs/creating-a-spinnaker-instance](http://www.spinnaker.io/docs/creating-a-spinnaker-instance).  For instructions on a Windows machine see below.\n\n8. If you are using a Windows machine launch Putty and navigate to **Change Settings > SSH > Tunnels**.\n\n9. In the Options controlling SSH port forwarding window, enter **8084** for Source port. Then enter **127.0.0.1:8084** for the Destination. Click **Add**. Repeat this process for ports: **8087** and **9000**, until you have all three listed in the text box for Forward ports. When finished, click **Open** to establish the connection.\n\n10. On your local machine open a browser and navigate to **http://localhost:9000** where you should see a Spinnaker web page page render.\n \n11. If you encounter issues see [Spinnaker Troubleshooting Guide]( http://www.spinnaker.io/docs/troubleshooting-guide \"troubleshooting guide\")\n   \n### Cloud Foundry\n\n1. Sign into Pivotal Web Services or your local instance of Cloud Foundry. \n\n2. In your organization, create a new space. Note your organization name and space name to use in spinnaker-local.yml settings.\n\n3. In the space, create a redis service and name it something like spinnaker-redis.\n\n4. Go to http://cloud.spring.io/spring-cloud-spinnaker/, and either download the version you wish, or click through to a hosted copy (which can install a public facing instance of CF like on PWS).\n\n5. Use the installed deploy to install Spinnaker using its directions, applying the org, space, and redis instance created earlier.\n\n### Google Cloud Platform\n\nFor an in depth deployment guide go to the [Spinnaker on Compute Engine solution](https://cloud.google.com/solutions/spinnaker-on-compute-engine).  \n\nFor a quick and customizable deployment methodology, you can use the [Spinnaker Deployment Manager templates](https://github.com/GoogleCloudPlatform/spinnaker-deploymentmanager).\n\n### Kubernetes\n\nFollow the steps [here](https://github.com/spinnaker/spinnaker/tree/master/experimental/kubernetes/simple).\n\n### Localhost\n\nIf you just want to try running on your local workstation, type in the following command:\n\n    bash <(curl --silent https://spinnaker.bintray.com/scripts/InstallSpinnaker.sh)\n\nThe above [script](https://github.com/spinnaker/spinnaker/blob/master/InstallSpinnaker.sh)\ninstalls and configures Spinnaker, and starts all Spinnaker components, including Redis and Cassandra, which Spinnaker components use to store data. If you see any errors, please just run the command again.\n\nIt will take several minutes to install and configure Spinnaker along with all of its dependencies. Once the install is complete, you will use your web browser to interact with Spinnaker.  If you are running Spinnaker on AWS, point your browser at [http://localhost:8081](http://localhost:8081). Or, if you are running Spinnaker on GCP, point your browser at [http://localhost:9000](http://localhost:9000).","excerpt":"","slug":"creating-a-spinnaker-instance","type":"basic","title":"Deploying Spinnaker"}

Deploying Spinnaker


Once you've setup your [Cloud provider environment](doc:target-deployment-setup) you are ready to install and run Spinnaker. Your choice of where to run Spinnaker does not affect your choice of deployment targets, but some of the hosted turn-key solutions are preconfigured to deploy to a limited set of platforms. This can be circumvented by reading how to [configure your target deployment environment](doc:target-deployment-configuration). Once Spinnaker is installed and configured, you can test it out by creating a sample [bake and deploy pipeline](doc:bake-and-deploy-pipeline). ## Spinnaker Components Spinnaker is composed of several microservices that provide each piece of the functionality of the system. [block:parameters] { "data": { "0-0": "**Component Name** ", "0-1": "**Functionality**", "0-2": "**Default Port**", "1-0": "Deck", "1-1": "User interface.", "1-2": "9000", "2-0": "Gate", "2-1": "Api gateway. All external requests to Spinnaker are directed through Gate.", "2-2": "8084", "3-0": "Orca", "3-1": "Orchestration of pipelines and ad hoc operations.", "3-2": "8083", "4-0": "Clouddriver", "4-1": "Interacts with and mutates infrastructure on underlying cloud providers.", "4-2": "7002", "5-0": "Rosco", "5-1": "Machine image bakery. A machine image is a static view of the state and disk of a machine that can be 'deployed' into a running instance. Representation varies by cloud provider.", "5-2": "8087", "6-0": "Front50", "6-1": "Interface to persistent storage, such as Amazon S3 or Google Cloud Storage.", "6-2": "8080", "7-0": "Igor", "7-1": "Interface to Jenkins. Can both listen to and fire Jenkins jobs and collect contextual job and build information.", "7-2": "8088", "8-0": "Echo", "8-1": "Event bus for notifications and triggers. Triggers are things like git commits, Jenkins jobs finishing and other Spinnaker pipelines finishing. Notifications can send emails, slack notifications, SMS messages, etc.", "8-2": "8089" }, "cols": 3, "rows": 9 } [/block] Spinnaker can be deployed on any target environment, and can manage infrastructure in any of the supported cloud providers. For instance, you can deploy your Spinnaker cluster to Google Cloud Platform, but manage infrastructure on Amazon Web Services and Kubernetes. Next, we'll step through the configuration for each of the supported target environments. ## Installation Targets * [Amazon Web Services](doc:creating-a-spinnaker-instance#section-amazon-web-services) * [Azure](doc:creating-a-spinnaker-instance#section-azure) * [Docker Compose](https://github.com/spinnaker/spinnaker/tree/master/experimental/docker-compose) * [Cloud Foundry](doc:creating-a-spinnaker-instance#section-cloud-foundry) * [Google Cloud Platform](doc:creating-a-spinnaker-instance#section-google-cloud-platform) * [Kubernetes](doc:creating-a-spinnaker-instance#section-kubernetes) * [Localhost](doc:creating-a-spinnaker-instance#section-localhost) ### Amazon Web Services Create an AWS virtual machine. 1. Goto [AWS Console](https://console.aws.amazon.com) > AWS Identity & Access Management > Roles. * Click on **Create New Role**. * Type "spinnakerRole" in the **Role Name** field. Hit **Next Step**. * Click **Select** for the **Amazon EC2** service. * Select the checkbox next to **PowerUserAccess**, then click **Next Step**, followed by **Create Role**. * Click on the role you created. * Click on the **Inline Policies** header, then click the link to create an inline policy. * Click **Select** for **Policy Generator**. * Select **AWS Identity and Access Management** from the **AWS Service** pulldown. * Select **PassRole** for **Actions**. * Type <code>*</code> (the asterisk character) in the **Amazon Resource Name (ARN)** box. * Click **Add Statement**, then **Next Step**. * Click **Apply Policy**. * Goto [AWS Console](https://console.aws.amazon.com) > EC2. * Click **Launch Instance**. * Click **Community AMIs** then * If the default region where your resources were allocated in [Step 1](#step-1-set-up-your-target-deployment-environment) is <code>us-west-2</code>, click **Select** for the **Spinnaker-Ubuntu-14.04-42 - [ami-cfb87eaf](https://console.aws.amazon.com/ec2/home?region=us-west-2#launchAmi=ami-cfb87eaf)** image. Otherwise, consult [this region-to-AMI mapping table](http://www.spinnaker.io/docs/amazon-ami-ids) to identify an appropriate image to use. * Under **Step 2: Choose an Instance Type**, click the radio button for **m4.xlarge**, then click **Next: Configure Instance Details**. * Set the **Auto-assign Public IP** field to **Enable**, and the **IAM role** to "spinnakerRole". * Click **Review and Launch**. * Click **Launch**. * Select the `my-aws-account-keypair` you created earlier. * Click **View Instances**. Make note of the **Public IP** field for the newly-created instance. This will be needed in the next step. * Note that it will take several minutes for Spinnaker post-configurations to complete. 2. SSH in and upgrade Spinnaker. ssh <Public DNS name of instance you just created> Run the command sudo apt-get update then run sudo apt-get upgrade spinnaker 3. Open an SSH tunnel from your host to the virtual machine. * Add this to ~/.ssh/config Host spinnaker-start HostName <Public DNS name of instance you just created> IdentityFile </path/to/my-aws-account-keypair.pem> ControlMaster yes ControlPath ~/.ssh/spinnaker-tunnel.ctl RequestTTY no LocalForward 9000 127.0.0.1:9000 LocalForward 8084 127.0.0.1:8084 LocalForward 8087 127.0.0.1:8087 User ubuntu Host spinnaker-stop HostName <Public DNS name of instance you just created> IdentityFile </path/to/my-aws-account-keypair.pem> ControlPath ~/.ssh/spinnaker-tunnel.ctl RequestTTY no * Create a spinnaker-tunnel.sh file with the following content, and give it execute permissions #!/bin/bash socket=$HOME/.ssh/spinnaker-tunnel.ctl if [ "$1" == "" ]; then echo "Please run either ./spinnaker-tunnel.sh start or ./spinnaker-tunnel.sh stop" fi if [ "$1" == "start" ]; then if [ ! \( -e ${socket} \) ]; then echo "Starting tunnel to Spinnaker..." ssh -f -N spinnaker-start && echo "Done." else echo "Tunnel to Spinnaker running." fi fi if [ "$1" == "stop" ]; then if [ \( -e ${socket} \) ]; then echo "Stopping tunnel to Spinnaker..." ssh -O "exit" spinnaker-stop && echo "Done." else echo "Tunnel to Spinnaker stopped." fi fi * Execute the script to start your Spinnaker tunnel ./spinnaker-tunnel.sh start * You can also stop your Spinnaker tunnel ./spinnaker-tunnel.sh stop * Once you have started your Spinnaker tunnel, you can connect to Spinnaker in your browser using the address: http://127.0.0.1:9000/ ### Azure For quick and easy setup, deploy an [Azure Quickstart Template](https://aka.ms/azspinnaker). Otherwise, follow these steps: 1. Launch a virtual machine in Azure. See [Creating Linux virtual machines](https://azure.microsoft.com/en-us/documentation/services/virtual-machines/linux/) for more details. 2. Install Spinnaker on your virtual machine. For a Linux machine, execute the command: <code>sudo bash -xc "$(curl -s https://raw.githubusercontent.com/spinnaker/spinnaker/master/InstallSpinnaker.sh)"</code> 3. If you are targeting a [Kubernetes cluster on Azure](https://aka.ms/azspinkubecreate), specify **none** as a cloud provider. If you are targeting VM Scale Sets on Azure, specify **azure** as a cloud provider and choose a default region where you will deploy resources. 4. Run the command <code>sudo apt-get update</code> then run <code>sudo apt-get upgrade spinnaker</code> 5. Execute <code>curl http://localhost:9000</code> and verify you get a response. Spinnaker is now installed and configured. 6. Execute <code>curl http://localhost:8084/health</code> and verify you get a response. 7. Configure SSH port forwarding on your local machine to test the setup. For instructions for Linux see step 2 in the AWS docs here: [http://www.spinnaker.io/docs/creating-a-spinnaker-instance](http://www.spinnaker.io/docs/creating-a-spinnaker-instance). For instructions on a Windows machine see below. 8. If you are using a Windows machine launch Putty and navigate to **Change Settings > SSH > Tunnels**. 9. In the Options controlling SSH port forwarding window, enter **8084** for Source port. Then enter **127.0.0.1:8084** for the Destination. Click **Add**. Repeat this process for ports: **8087** and **9000**, until you have all three listed in the text box for Forward ports. When finished, click **Open** to establish the connection. 10. On your local machine open a browser and navigate to **http://localhost:9000** where you should see a Spinnaker web page page render. 11. If you encounter issues see [Spinnaker Troubleshooting Guide]( http://www.spinnaker.io/docs/troubleshooting-guide "troubleshooting guide") ### Cloud Foundry 1. Sign into Pivotal Web Services or your local instance of Cloud Foundry. 2. In your organization, create a new space. Note your organization name and space name to use in spinnaker-local.yml settings. 3. In the space, create a redis service and name it something like spinnaker-redis. 4. Go to http://cloud.spring.io/spring-cloud-spinnaker/, and either download the version you wish, or click through to a hosted copy (which can install a public facing instance of CF like on PWS). 5. Use the installed deploy to install Spinnaker using its directions, applying the org, space, and redis instance created earlier. ### Google Cloud Platform For an in depth deployment guide go to the [Spinnaker on Compute Engine solution](https://cloud.google.com/solutions/spinnaker-on-compute-engine). For a quick and customizable deployment methodology, you can use the [Spinnaker Deployment Manager templates](https://github.com/GoogleCloudPlatform/spinnaker-deploymentmanager). ### Kubernetes Follow the steps [here](https://github.com/spinnaker/spinnaker/tree/master/experimental/kubernetes/simple). ### Localhost If you just want to try running on your local workstation, type in the following command: bash <(curl --silent https://spinnaker.bintray.com/scripts/InstallSpinnaker.sh) The above [script](https://github.com/spinnaker/spinnaker/blob/master/InstallSpinnaker.sh) installs and configures Spinnaker, and starts all Spinnaker components, including Redis and Cassandra, which Spinnaker components use to store data. If you see any errors, please just run the command again. It will take several minutes to install and configure Spinnaker along with all of its dependencies. Once the install is complete, you will use your web browser to interact with Spinnaker. If you are running Spinnaker on AWS, point your browser at [http://localhost:8081](http://localhost:8081). Or, if you are running Spinnaker on GCP, point your browser at [http://localhost:9000](http://localhost:9000).