Skip to content

Instantly share code, notes, and snippets.

[Unit]
Description=Runs cloud-init URLs in leui of support in oem-cloudinit
After=oem-cloudinit.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/bash -c '/usr/bin/coreos-cloudinit -from-url "https://example-cloudinit-includes.s3.amazonaws.com/coreos/common/my-ca-cert.yaml"'
@rdark
rdark / gist:90cbfc2d539638d66cc9
Created May 14, 2015 16:03
vpce endpoint s3 bucket policy
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "Get-Access-from-UACT-VPCE-only",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject",
"s3:GetBucketLocation"
[Unit]
Description=Docker Registry
After=docker.service
Requires=docker.service
[Service]
EnvironmentFile=/etc/environment
EnvironmentFile=/etc/profile.d/etcdctl.sh
ExecStartPre=-/usr/bin/docker kill docker-registry
ExecStartPre=-/usr/bin/docker rm docker-registry
-- Logs begin at Wed 2015-06-10 14:03:02 , end at Wed 2015-06-10 14:12:52 . --
Jun 10 14:03:30 ip-123-123-123-105.eu-west-1.compute.internal systemd[1]: Started etcd2.
Jun 10 14:03:30 ip-123-123-123-105.eu-west-1.compute.internal systemd[1]: Starting etcd2...
Jun 10 14:03:36 ip-123-123-123-105.eu-west-1.compute.internal etcd2[598]: 2015/06/10 14:03:36 etcd: peerTLS: cert = /etc/ssl/etcd/certs/cont-cros-uact-001.crt, key = /etc/ssl/etcd/private/cont-cros-uact-001.key, ca = /etc/ssl/etcd/certs/etcd-ca.crt
Jun 10 14:03:39 ip-123-123-123-105.eu-west-1.compute.internal etcd2[598]: 2015/06/10 14:03:39 etcd: listening for peers on https://123.123.123.105:2380
Jun 10 14:03:39 ip-123-123-123-105.eu-west-1.compute.internal etcd2[598]: 2015/06/10 14:03:39 etcd: clientTLS: cert = /etc/ssl/etcd/certs/cont-cros-uact-001.crt, key = /etc/ssl/etcd/private/cont-cros-uact-001.key, ca = /etc/ssl/etcd/certs/etcd-ca.crt
Jun 10 14:03:42 ip-123-123-123-105.eu-west-1.compute.internal etcd2[598]: 2015/06/10 14:03:42 etcd: listening fo
[16/Jul/2015:08:58:22][TP-Processor5]: CMSServlet:service() uri = /ca/agent/ca/displayBySerial
[16/Jul/2015:08:58:22][TP-Processor5]: CMSServlet::service() param name='xml' value='true'
[16/Jul/2015:08:58:22][TP-Processor5]: CMSServlet::service() param name='serialNumber' value='16'
[16/Jul/2015:08:58:22][TP-Processor5]: CMSServlet: caDisplayBySerial start to service.
[16/Jul/2015:08:58:22][TP-Processor5]: IP: 10.33.213.102
[16/Jul/2015:08:58:22][TP-Processor5]: AuthMgrName: certUserDBAuthMgr
[16/Jul/2015:08:58:22][TP-Processor5]: CMSServlet: retrieving SSL certificate
[16/Jul/2015:08:58:22][TP-Processor5]: CMSServlet: certUID=CN=IPA RA,O=PROD.EXAMPLE.NET
[16/Jul/2015:08:58:22][TP-Processor5]: CertUserDBAuth: started
[16/Jul/2015:08:58:22][TP-Processor5]: CertUserDBAuth: Retrieving client certificate
@rdark
rdark / [email protected]
Last active August 29, 2015 14:25
timer only running once
[Unit]
Description=Etcd Backup Ruby %i
After=docker.service
Requires=docker.service
[Service]
TimeoutStartSec=300
EnvironmentFile=/etc/environment
EnvironmentFile=/etc/custom_environment
ExecStartPre=-/usr/bin/docker kill %p-%i
$ journalctl -t fleetd -n --no-pager
-- Logs begin at Tue 2015-11-03 07:55:37 UTC, end at Thu 2015-11-19 11:55:03 UTC. --
Nov 19 11:16:29 ip-172-16-16-148.eu-west-1.compute.internal fleetd[1543]: INFO fleet.go:160: No provided or default config file found - proceeding without
Nov 19 11:16:30 ip-172-16-16-148.eu-west-1.compute.internal fleetd[1543]: INFO server.go:152: Establishing etcd connectivity
Nov 19 11:16:30 ip-172-16-16-148.eu-west-1.compute.internal fleetd[1543]: INFO server.go:163: Starting server components
Nov 19 11:16:31 ip-172-16-16-148.eu-west-1.compute.internal fleetd[1543]: INFO engine.go:79: Engine leader is 08cef7b78aa14d96b2c9d76412f1b521
Nov 19 11:16:31 ip-172-16-16-148.eu-west-1.compute.internal fleetd[1543]: INFO manager.go:246: Writing systemd unit enable-update-engine.service (296b)
Nov 19 11:16:31 ip-172-16-16-148.eu-west-1.compute.internal fleetd[1543]: INFO manager.go:182: Instructing systemd to reload units
Nov 19 11:16:31 ip-172-16-16-148.eu-west-1.compute.internal fleetd[1543]: I
resource "aws_security_group_rule" "allow_all_outbound" {
type = "egress"
from_port = 0
to_port = 0
protocol = "-1"
cidr_blocks = ["0.0.0.0/0"]
security_group_id = "${aws_security_group.app_name.id}"
}
* aws_security_group_rule.allow_all_outbound: [WARN] A duplicate Security Group rule was found. This may be
a side effect of a now-fixed Terraform issue causing two security groups with
identical attributes but different source_security_group_ids to overwrite each
other in the state. See https://github.com/hashicorp/terraform/pull/2376 for more
information and instructions for recovery. Error message: the specified rule "peer: 0.0.0.0/0, ALL, ALLOW" already exists
Terraform does not automatically rollback in the face of errors.
Instead, your Terraform state file has been partially updated with
any resources that successfully completed. Please address the error
above and apply again to incrementally change your infrastructure.
@rdark
rdark / system_profiler_output.rb
Last active May 16, 2016 10:14
OSX Hardware Info
#!/usr/bin/env ruby
#
# Pull basic hardware info from system profiler and copy to clipboard
#
require 'open3'
hardware = {
model_identifer: 'Model Identifier',
model_name: 'Model Name',
sys_serial: 'Serial Number \(system\)',