Skip to content

Instantly share code, notes, and snippets.

View walterheck's full-sized avatar

Walter Heck walterheck

View GitHub Profile
#!/usr/bin/env python3
import argparse
import time
import datetime
import sys
import boto3
def main(db_id, source_profile, target_profile, target_instance_name,
snapshot_style, target_dbsubnet_group, target_security_group, overwrite_target,
rename_target):

HOWTO: Installing Vault On AWS Linux

This is quick howto for installing vault on AWS Linux, mostly to remind myself. At the end of this tutorial, you'll have a working vault server, using s3 for the backend, self signed certificates for tls, and supervisord to ensure that the vault server is always running, and starts on reboot.

Setting up S3

First things first, let's set up an s3 bucket to use as the storage backend for our s3 instance.

  1. From the AWS Mangement Console, go to the S3 console.

  2. Click on the Create Bucket button

[root@yomama ~]# foreman-installer --enable-foreman-plugin-openscap
Could not start Service[postgresqld]: Execution of '/sbin/service postgresql start' returned 1: postgresql: unrecognized service
/Stage[main]/Postgresql::Server::Service/Service[postgresqld]/ensure: change from stopped to running failed: Could not start Service[postgresqld]: Execution of '/sbin/service postgresql start' returned 1: postgresql: unrecognized service
Installing Done [100%] [..........................................................................................................................................................]
Something went wrong! Check the log for ERROR-level output
* Foreman is running at https://yomama.someco.local
Initial credentials are admin / notgonnatellyou
* Foreman Proxy is running at https://yomama.someco.local:8443
* Puppetmaster is running at port 8140
The full log is at /var/log/foreman-installer/foreman.log
[root@icinga2 icinga2]# cat /etc/icingaweb2/resources.ini
[icingaweb_db]
type = db
db = "mysql"
host = "10.20.1.60"
port = "3306"
dbname = "icinga2_web"
username = "icinga2_web"
password = "password"
walterheck@walter-envy:~/source/opstheater/deploy/vagrant-oscar$ vagrant provision foss-master
Vagrant failed to initialize at a very early stage:
There was an error loading a Vagrantfile. The file being loaded
and the error message are shown below. This is usually caused by
a syntax error.
Path: /home/walterheck/Dropbox/Source/opstheater/deploy/vagrant-oscar/Vagrantfile
Line number: 4
Message: LoadError: cannot load such file -- git
foss-puppet-master:
provider:
type: virtualbox
customize:
- [modifyvm, !ruby/sym id, '--memory', 6144]
provisioners:
- type: hosts
add_localhost_hostnames: false
sync_hosts: true
- type: shell

If you're doing a lot of command line work with icinga configurations and you happen to use vim a lot, it is super useful to use the vim syntax highlighting that comes with icinga2. Here's how to set it up on a CentOS/RHEL 7 box.

  • First, make sure you have the icinga2-common package installed. This is a dependency of the icinga2 package, so it should be as easy as pie:
[root@icinga2 ~]# yum install icinga2
Loaded plugins: fastestmirror
icinga-stable-release             |  951 B  00:00:00
icinga-stable-release/7/primary   |  21 kB  00:00:00
Loading mirror speeds from cached hostfile
 * base: mirror.nl.leaseweb.net
<<<<<<< 327d88f5e6ba7c20ea0103f1f02d2bfb54a9b52f
public function updatedeviceinfoAction() {
if ($user = $this->checkAuth()) {
extract($this->getRequest()->getPost());
$device_token = $this->_getParam('device_token');
$device_type = $this->_getParam('device_type');
if (empty($device_token)) {
$this->JSONErrorOutput('device token required');
[root@gitlab gitlab]# cat /var/opt/gitlab/nginx/conf/gitlab-http.conf
# This file is managed by gitlab-ctl. Manual changes will be
# erased! To change the contents below, edit /etc/gitlab/gitlab.rb
# and run `sudo gitlab-ctl reconfigure`.
## GitLab
## Modified from https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/gitlab-ssl & https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/support/nginx/gitlab
##
## Lines starting with two hashes (##) are comments with information.
## Lines starting with one hash (#) are configuration parameters that can be uncommented.
root@opstheatre:~/ops-theatre# node --harmony --es-staging app.js
connect deprecated multipart: use parser (multiparty, busboy, formidable) npm module instead node_modules/express/node_modules/connect/lib/middleware/bodyParser.js:56:20
connect deprecated limit: Restrict request size at location of read node_modules/express/node_modules/connect/lib/middleware/multipart.js:86:15
connect deprecated methodOverride: use method-override npm module instead app.js:27:17
Loading module: core
Loading module: facter
Loading module: hiera
Loading module: manifests
Loading module: modules
Loading module: puppetdb