Skip to content

Instantly share code, notes, and snippets.

View afiune's full-sized avatar
🏠
Working from home

Salim Afiune Maya afiune

🏠
Working from home
View GitHub Profile
@afiune
afiune / quick_start.md
Last active February 29, 2016 21:21
Delivery Tutorial - Cloud Formation Project

Delivery Tutorial - Quick Start

Follow these steps to create and deploy a Delivery Tutorial Cloudformation Stack.

Prerequisites

  1. Configure your ~/.aws/credentials file following this instructions.
[2016-02-29T13:58:28+00:00] INFO: Forking chef instance to converge...
[2016-02-29T13:58:28+00:00] INFO: *** Chef 12.7.2 ***
[2016-02-29T13:58:28+00:00] INFO: Chef-client pid: 4040
[2016-02-29T13:58:29+00:00] INFO: Run List is [recipe[delivery-base], recipe[awesome_customers]]
[2016-02-29T13:58:29+00:00] INFO: Run List expands to [delivery-base, awesome_customers]
[2016-02-29T13:58:29+00:00] INFO: Starting Chef Run for customers-web-app-delivery-acceptance
[2016-02-29T13:58:29+00:00] INFO: Running start handlers
[2016-02-29T13:58:29+00:00] INFO: Start handlers complete.
[2016-02-29T13:58:29+00:00] INFO: Loading cookbooks [delivery-base@0.2.1, push-jobs@2.6.4, runit@1.7.4, packagecloud@0.1.0, windows@1.38.3, chef_handler@1.2.0, chef-ingredient@0.15.0, apt-chef@0.2.0, apt@2.9.2, yum-chef@0.2.1, yum@3.8.2, awesome_customers@0.1.0, chef-sugar@3.3.0, firewall@2.4.0, httpd@0.3.4, compat_resource@12.7.3]
[2016-02-29T13:58:30+00:00] WARN: Default value nil is invalid for property cookbook of resource . Possible fixes
@afiune
afiune / tf_delivery_cluster_full_steps.out
Last active February 4, 2016 23:03
Stand up Delivery Cluster with Terraform (tf_delivery_cluster)
➜ github git clone git@github.com:chef/tf_delivery_cluster.git
Cloning into 'tf_delivery_cluster'...
remote: Counting objects: 919, done.
remote: Compressing objects: 100% (607/607), done.
remote: Total 919 (delta 173), reused 919 (delta 173), pack-reused 0
Receiving objects: 100% (919/919), 721.34 KiB | 533.00 KiB/s, done.
Resolving deltas: 100% (173/173), done.
Checking connectivity... done.
➜ github cd tf_delivery_cluster
#
# Instances
#
# Setup chef-server
resource "aws_instance" "chef-server" {
ami = "${lookup(var.centos-6-amis, var.aws_default_region)}"
count = "${lookup(var.instance_counts, "chef-server")}"
instance_type = "${lookup(var.instances, "chef-server")}"
subnet_id = "${aws_subnet.terraform-delivery-cluster.id}"
vpc_security_group_ids = ["${aws_security_group.chef-server.id}"]
@afiune
afiune / delivery_publish_cookbook_multiple_chef_server.md
Last active July 19, 2017 20:58
Delivery Publish Cookbook to Multiple Chef Server/Organizations

Publish Cookbook to Multiple Chef Servers in Delivery

Our delivery-sugar cookbook exposes some libraries and a LWRP that we can use to publish a cookbook (or multiple) to multiple Chef Servers or Organizations.

Prerequisites

The only prerequisite we have before start coding is the generation of the knife.rb and the client_key on the build-nodes that we will use in the build-cookbook. This can be done manually by loging in to the build-nodes and laying down the file, or in an

@afiune
afiune / gist:dd71e289bf6648217539
Created December 3, 2015 00:17
delivery-ctl reconfigure fix for ubuntu
root@ip-10-194-15-215:/opt/delivery/embedded/cookbooks/enterprise# delivery-ctl reconfigure
Starting Chef Client, version 12.5.1
resolving cookbooks for run list: ["delivery"]
Synchronizing Cookbooks:
- delivery (0.2.11)
- enterprise (0.9.1)
- runit (1.7.4)
- packagecloud (0.1.0)
Compiling Cookbooks...
Recipe: delivery::omnibus
@afiune
afiune / Temporal-README.md
Last active November 2, 2015 19:49
delivery-sugar

delivery-sugar

Delivery Sugar is a library cookbook that includes a collection of helpful sugars and custom resources that make creating build cookbooks for Chef Delivery projects a delightful experience.

Installation

If you are using Berkshelf, add delivery-sugar to your Berksfile:

➜ delivery_build git:(afiune/replace-push-jobs-for-delivery-base) ✗ kitchen test default-ubuntu-1204
-----> Starting Kitchen (v1.4.2)
-----> Cleaning up any prior instances of <default-ubuntu-1204>
-----> Destroying <default-ubuntu-1204>...
==> default: Forcing shutdown of VM...
==> default: Destroying VM and associated drives...
Vagrant instance <default-ubuntu-1204> destroyed.
Finished destroying <default-ubuntu-1204> (0m3.97s).
-----> Testing <default-ubuntu-1204>
-----> Creating <default-ubuntu-1204>...
@afiune
afiune / Both files credentials and config under .aws
Created September 26, 2015 22:05
Start a delivery-cluster from scratch
[default]
region=us-west-2
aws_access_key_id =
aws_secret_access_key =
@afiune
afiune / Full Delivery Cluster Run with Vagrant
Created September 25, 2015 21:19
Full Delivery Cluster Run with Vagrant
➜ delivery-cluster git:(afiune/158/lazy_delivery_cert) ✗ rake maintenance:clean_cache
➜ delivery-cluster git:(afiune/158/lazy_delivery_cert) ✗ rake setup:cluster
Install rubygem dependencies locally
Using rake 10.4.2
Using addressable 2.3.8
Using artifactory 2.3.0
Using jmespath 1.1.3
Using aws-sdk-core 2.1.23