Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
# Spinnaker Course

A comprehensive course and deployment toolkit for [Spinnaker](https://spinnaker.io/), a multi-cloud continuous delivery platform. This repository contains installation scripts, configuration examples, and infrastructure-as-code templates to deploy and configure Spinnaker across multiple environments.

## Repository Structure

```
.
├── scripts/ # Core Spinnaker installation scripts (standalone VM)
├── vagrant/ # Vagrant-based local development environment
├── aws/terraform/ # AWS infrastructure setup using Terraform
├── kubernetes/ # Kubernetes provider integration and RBAC
├── jenkins/ # Jenkins CI integration scripts
├── docs/ # Reference documentation and configuration examples
└── artifact/ # Deployment artifacts
```

## Prerequisites

- **Hardware:** Minimum 8 GB RAM, 4 CPUs, 30 GB disk
- **Software:** Git, Bash shell
- **For Vagrant setup:** [Vagrant](https://www.vagrantup.com/) and [VirtualBox](https://www.virtualbox.org/)
- **For AWS setup:** [Terraform](https://www.terraform.io/), AWS CLI configured with credentials
- **For Kubernetes setup:** A running Kubernetes cluster with `kubectl` configured

## Getting Started

### Option 1: Local Setup with Vagrant

The quickest way to get started locally:

```bash
cd vagrant/
vagrant plugin install vagrant-disksize
vagrant up
```

See [vagrant/README.md](vagrant/README.md) for SSH tunnel setup and browser access.

### Option 2: Standalone VM Installation

Run the scripts in order on a fresh Ubuntu server:

```bash
# 1. Create the ubuntu system user
sudo bash scripts/1-create-user.sh

# 2. Allocate swap space (recommended for servers with limited RAM)
sudo bash scripts/2-swapon.sh

# 3. Install Halyard, Java, Docker, and MinIO
bash scripts/3-install-halyard.sh

# 4. (Optional) Configure OAuth2 authentication
# Set CLIENT_ID, CLIENT_SECRET, PROVIDER, and REDIRECT_URI first
bash scripts/4-configure-oauth.sh

# 5. Deploy Spinnaker
bash scripts/5-deploy-spinnaker.sh

# 6. Restart Spinnaker services (if needed)
bash scripts/6-restart-spinnaker.sh
```

### Option 3: AWS with Terraform

```bash
cd aws/terraform/
# Edit vars.tf with your AWS account ID and profile
terraform init
terraform apply
```

This creates a VPC with public/private subnets, IAM roles, and a key pair for Spinnaker.

### Option 4: Kubernetes Integration

```bash
# Install Kubernetes cluster
bash kubernetes/scripts/install-k8s.sh

# Enable Kubernetes provider in Spinnaker
bash kubernetes/scripts/enable-k8s-on-spinnaker.sh

# Run a demo application
bash kubernetes/scripts/run-helloworld.sh
```

## Jenkins Integration

To set up Jenkins as a CI trigger for Spinnaker pipelines:

```bash
sudo bash jenkins/1-create-user.sh
bash jenkins/2-jenkins-install.sh
bash jenkins/3-create-debian.sh
```

See [docs/jenkins.txt](docs/jenkins.txt) for Halyard configuration commands.

## Documentation

The `docs/` directory contains reference material:

- **build-amis.txt** — Packer template for building AMIs
- **debian-package.txt** — Building Debian packages with aptly
- **hal-aws-provider.txt** — Halyard AWS provider configuration
- **iam-roles.txt** — IAM policy definitions for Spinnaker
- **jenkins.txt** — Jenkins CI integration with Halyard
- **rosco.txt** — Rosco (image baker) configuration

## Accessing Spinnaker

Once deployed, Spinnaker is available at:

- **UI (Deck):** `http://<your-ip>:9000`
- **API (Gate):** `http://<your-ip>:8084`

## License

See the repository for license details.
2 changes: 1 addition & 1 deletion docs/iam-roles.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,6 @@ Policy:
"Principal": {
"AWS": "${AUTH_ARN}"
},
"Action": "sts:AssumeRole"
"Action": "sts:AssumeRole"
}]
}
3 changes: 1 addition & 2 deletions kubernetes/scripts/run-helloworld.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#!/bin/bash
kubectl run helloworld --image=k8s.gcr.io/echoserver:1.4 --port=8080
kubectl create deployment helloworld --image=k8s.gcr.io/echoserver:1.4 --port=8080
kubectl expose deployment helloworld --type=NodePort

10 changes: 5 additions & 5 deletions vagrant/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# Vagrant Setup

Start as usual

```
Expand All @@ -17,8 +19,8 @@ Host spinnaker-start
UserKnownHostsFile /dev/null
StrictHostKeyChecking no
PasswordAuthentication no
## Put your own identity file
IdentityFile C:/Users/caroman/Desktop/spinnaker-course/vagrant/.vagrant/machines/default/virtualbox/private_key
## Put your own identity file (update the path below to match your system)
IdentityFile /path/to/spinnaker-course/vagrant/.vagrant/machines/default/virtualbox/private_key
IdentitiesOnly yes
LogLevel FATAL
ControlMaster yes
Expand All @@ -31,6 +33,4 @@ Host spinnaker-start

After that: `ssh spinnaker-start`


And then open you browser in `127.0.0.1:9000
`
And then open your browser at `http://127.0.0.1:9000`