From db9afe47a439c6263f6496fe29020014e51f88bc Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 14 Feb 2026 01:07:56 +0000 Subject: [PATCH] Add root README and fix docs, scripts, and formatting issues - Add comprehensive root-level README.md with project overview, structure, prerequisites, and getting-started instructions - Fix vagrant/README.md: broken markdown formatting, hardcoded Windows path replaced with generic placeholder, typo fix - Fix docs/iam-roles.txt: correct indentation of misaligned "Action" field in spinnakerManaged policy JSON - Fix kubernetes/scripts/run-helloworld.sh: replace deprecated `kubectl run` with `kubectl create deployment` (removed in K8s 1.18+) https://claude.ai/code/session_01GPCthhUm3Ai2oVKtGWWBXi --- README.md | 121 +++++++++++++++++++++++++++ docs/iam-roles.txt | 2 +- kubernetes/scripts/run-helloworld.sh | 3 +- vagrant/README.md | 10 +-- 4 files changed, 128 insertions(+), 8 deletions(-) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..f4cd61c --- /dev/null +++ b/README.md @@ -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://:9000` +- **API (Gate):** `http://:8084` + +## License + +See the repository for license details. diff --git a/docs/iam-roles.txt b/docs/iam-roles.txt index c95a476..dbef4af 100644 --- a/docs/iam-roles.txt +++ b/docs/iam-roles.txt @@ -56,6 +56,6 @@ Policy: "Principal": { "AWS": "${AUTH_ARN}" }, - "Action": "sts:AssumeRole" + "Action": "sts:AssumeRole" }] } \ No newline at end of file diff --git a/kubernetes/scripts/run-helloworld.sh b/kubernetes/scripts/run-helloworld.sh index 2680174..7da993c 100755 --- a/kubernetes/scripts/run-helloworld.sh +++ b/kubernetes/scripts/run-helloworld.sh @@ -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 - diff --git a/vagrant/README.md b/vagrant/README.md index 29cfc40..896ed25 100644 --- a/vagrant/README.md +++ b/vagrant/README.md @@ -1,3 +1,5 @@ +# Vagrant Setup + Start as usual ``` @@ -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 @@ -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`