Skip to content

Instantly share code, notes, and snippets.

@ctennis
ctennis / gist:7272d2cae263ce9ddf95
Created March 2, 2016 22:26
ntpd on openstack nova compute nodes
If your nova compute nodes stop working properly, and in the /var/log/nova/nova-api.log you get periodic errors:
NeutronClientException: Authentication required
Aside from a misconfiguration, if it happens a short time after the node starts or periodically, the likely culprit is the time
on the node is off and you need to run/install ntpd.

Keybase proof

I hereby claim:

  • I am ctennis on github.
  • I am ctennis (https://keybase.io/ctennis) on keybase.
  • I have a public key ASDs1m5xaia8cHwMwmc0OcW52WpvSfGGGo5fB_ZT6rXS9wo

To claim this, I am signing this object:

@ctennis
ctennis / gist:4399453
Created December 28, 2012 16:37
systemd mount provider for opscode chef. I use this vs. letting chef modify my fstab file. You have to "activate" it in order for it to be used, something like this: Chef::Platform.set :platform => :arch, :resource => :mount, :provider => Chef::Provider::Mount::SystemdMount Caveat Emptor.
#
# Author:: Caleb Tennis (<joshua@opscode.com>)
# Copyright:: Copyright (c) 2012 Opscode, Inc
# License:: Apache License, Version 2.0
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
diff --git a/chef-repo/cookbooks/hudson/recipes/grails.rb b/chef-repo/cookbooks/hudson/recipes/grails.rb
index f76614c..3ef0d78 100644
--- a/chef-repo/cookbooks/hudson/recipes/grails.rb
+++ b/chef-repo/cookbooks/hudson/recipes/grails.rb
@@ -1,4 +1,7 @@
-directory "/opt/grails"
+directry "/tmp/opt/grails"
+link "/opt/grails" do
+ to "/tmp/opt/grails"
+end
function(doc) {
if (doc.chef_type == "node") {
emit(doc.name, doc.name);
}
}
Talking to Openstack's Swift with Cyberduck:
1. Install swift. Download cyberduck sources (3.5.1 as of this writing)
2. Both the proxy and auth servers will ultimately need to be running with SSL. You will need a key and certificate to do this, self signed is ok (but a little more work). Put these in /etc/swift/mycert.pem and /etc/swift/mykey.pem.
3. For swift-auth-create-account to work, the auth server must NOT be running as SSL. So if you want to use it to create an account, you'll have to make the auth-server non-SSL, run it to create the account, then change the auth-server back to SSL.
4. my proxy-server config:
# build machine
# ami-205fba49 w/ aki-9b00e5f2
# update yum / install dev tools
yum clean all
perl -p -i -e 's/.?baseurl\=http\:\/\/download.fedora.redhat.com\/pub\/fedora\/linux/baseurl\=http\:\/\/archives.fedoraproject.org\/pub\/archive\/fedora\/linux/g' \
/etc/yum.repos.d/*
perl -p -i -e 's/.?mirrorlist(.*)/\#mirrorlist$1/g' /etc/yum.repos.d/*
perl -p -i -e 's/gpgkey\=file\:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY-fedora/gpgkey\=file\:\/\/\/etc\/pki\/rpm-gpg\/RPM-GPG-KEY/g' \
/etc/yum.repos.d/fedora.repo
begin
r = resources(:template => '/etc/blah')
r.variables[:new_stuff] = 'foo'
rescue RuntimeError => e
template '/etc/blah' do
source 'blah.erb'
variables :one => 'two'
end
end