kubectl -n kube-system create sa tiller
kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceaccount=kube-system:tiller
helm init --service-account tiller
This is a pretty opinionated solution that we use internally. It's strictly designed to post to slack via the API and it uses our notion of wrapping EVERYTHING with a role. All of our plugins automatically use brain storage as well. To be able to execute anything with hubot, you have to be a rundeck_admin role user (per the hubot-auth plugin).
HUBOT_RUNDECK_URL should be set to the root URL of your Rundeck server, not
including the path to the current api version.
NOTE: Currently relying on Rundeck API version 12.
You should be able to tease out the rundeck API stuff specifically.
It depends on a common format for your job defs in rundeck. We have two types of jobs in rundeck that we use via this plugin:
This is a pretty opinionated solution that we use internally. It's strictly designed to post to slack via the API and it uses our notion of wrapping EVERYTHING with a role. All of our plugins automatically use brain storage as well. To be able to execute anything with hubot, you have to be a rundeck_admin role user.
You should be able to tease out the rundeck API stuff specifically.
It depends on a common format for your job defs in rundeck. We have two types of jobs in rundeck that we use via this plugin:
- ad-hoc
- predefined
ALL of our jobs have a common parameter called slack_channel. Hubot will automatically set this for you based on where/who it was talking to.
Let's say you're using Ubuntu 13.04 (Raring Ringtail, released in April 2013) and it just went End-of-Life on you, because it's supported for only 6 months, and the deprecated packages are taken down after 12 months.
You'll probably figure this out the hard way. When you run sudo apt-get update, it will eventually report these errors:
Ign http://archive.ubuntu.com raring-updates/universe Sources/DiffIndex
Err http://security.ubuntu.com raring-security/main Sources
404 Not Found [IP: 91.189.91.15 80]
Err http://security.ubuntu.com raring-security/universe Sources
404 Not Found [IP: 91.189.91.15 80]
| module("resty.consul", package.seeall) | |
| _VERSION = '0.1.0' | |
| function service_nodes(service) | |
| local http = require "resty.http" | |
| local json = require "cjson" | |
| local hc = http:new() | |
| local upstream = "" |
| unless Rails.env.production? | |
| connection = ActiveRecord::Base.connection | |
| connection.tables.each do |table| | |
| connection.execute("TRUNCATE #{table}") unless table == "schema_migrations" | |
| end | |
| sql = File.read('db/import.sql') | |
| statements = sql.split(/;$/) | |
| statements.pop |
| # force HTTP to HTTPS - /etc/nginx/conf.d/nonssl.conf | |
| server { | |
| listen 80; | |
| server_name jira.example.com; | |
| access_log off; | |
| return 301 https://$server_name$request_uri; | |
| } | |
| # /etc/nginx/conf.d/jira.conf | |
| server { |
| # Put this in ~/chef-repo/data_bags/aws/main.rb | |
| # Upload it to the Chef Server with: | |
| # | |
| # knife data bag item rb aws main.rb | |
| # | |
| # Export the two AWS values for your account. | |
| { | |
| 'id' => "main", | |
| 'aws_access_key_id' => ENV['AWS_ACCESS_KEY_ID'], |
The best way to use this tool is to hook apt's use of dpkg to run it before doing any package installs.
In your apt.conf, put this:
DPkg::Pre-Install-Pkgs {"xargs -rL1 bash /path/to/stripdeb.sh 2>&1 | logger -t stripdeb"}
Then, a demo:
% sudo apt-get install mysql-server-5.1