Skip to content

Instantly share code, notes, and snippets.

View elliott-davis's full-sized avatar

Elliott Davis elliott-davis

View GitHub Profile
@elliott-davis
elliott-davis / gist:704c1087555ce56964a3f582b883327f
Created August 24, 2018 16:17
Builder API routes with caching annotation
GET "/v1/depot/pkgs/origins/:origin/stats"
POST "/v1/depot/pkgs/schedule/:origin/:pkg"
GET "/v1/depot/pkgs/schedule/:groupid"
GET "/v1/depot/pkgs/schedule/:origin/status"
GET "/v1/depot/channels/:origin"
GET "/v1/depot/channels/:origin/:channel/pkgs"
GET "/v1/depot/channels/:origin/:channel/pkgs/:pkg"
GET "/v1/depot/channels/:origin/:channel/pkgs/:pkg/latest" -> NO CACHE
GET "/v1/depot/channels/:origin/:channel/pkgs/:pkg/:version"
GET "/v1/depot/channels/:origin/:channel/pkgs/:pkg/:version/latest" -> NO CACHE

Keybase proof

I hereby claim:

  • I am elliott-davis on github.
  • I am libsysguy (https://keybase.io/libsysguy) on keybase.
  • I have a public key ASCk75FUd97Q9neOgqmMuR0TKdJv8fXkG5mWVvZjvoqldQo

To claim this, I am signing this object:

# Change
apache_module 'headers'
# To
apache_module 'headers' do
restart true
end
# in apache2-server.rb
execute 'reset-horizon-compression' do
command 'python /usr/share/openstack-dashboard/manage.py compress --force'
action :run
end
template node['openstack']['dashboard']['apache']['sites-path'] do
# stuff that's already there
notifies :run 'execute[reset-horizon-compression]' :immediately
require 'chef/provisioning/fog_driver/driver'
with_driver 'fog:OpenStack'
with_machine_options bootstrap_options: {
image_ref: 'a93a8797-ff58-472d-991f-4257e2ce0e38',
flavor_ref: '1e77140c-8729-470b-9826-cf7dc9127e74',
nics: [{ net_id: 'f43d4bf5-3f30-4f65-b6d0-9395187d8617'}],
floating_ip_pool: '3c42f66f-b14b-444c-9dcf-72a043c6f3f3',
associate_public_ip: true
@elliott-davis
elliott-davis / gist:ae51f5e7c6489d85b219
Created February 25, 2015 17:50
provisioning options
with_machine_options bootstrap_options: {
image_ref: 'a93a8797-ff58-472d-991f-4257e2ce0e38',
flavor_ref: '1e77140c-8729-470b-9826-cf7dc9127e74',
nics: [{ net_id: 'f43d4bf5-3f30-4f65-b6d0-9395187d8617'}],
floating_ip_pool: '3c42f66f-b14b-444c-9dcf-72a043c6f3f3',
associate_public_ip_address: true
}
* remote_file[/tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb] action create_if_missing[2014-12-19T20:42:12+00:00] INFO: Processing remote_file[/tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb] action create_if_missing (rabbitmq::default line 43)
[2014-12-19T20:42:17+00:00] INFO: remote_file[/tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb] created file /tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb
- create new file /tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb[2014-12-19T20:42:17+00:00] INFO: remote_file[/tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb] updated file contents /tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb
- update content in file /tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb from none to f999f0
(new content is binary, diff output suppressed)
* dpkg_package[/tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb] action install[2014-12-19T20:42:17+00:00] INFO: Processing dpkg_package[/tmp/kitchen/cache/rabbitmq-server_3.4.2-1_all.deb] action install (ra
Elliotts-MacBook-Pro:chef elliott$ berks install
Resolving cookbook dependencies...
Fetching cookbook index from https://supermarket.getchef.com...
Using aws (2.1.1)
Using apache2 (3.0.0)
Using apt (2.3.8)
Using ark (0.9.0)
Using 7-zip (1.0.2)
Using ceph (0.2.1) from git://github.com/ceph/ceph-cookbook.git (at master)
Using cPanel (0.1.0) from git://enterprise.cpanel.net/chef/cPanel.git (at master)
@elliott-davis
elliott-davis / gist:2cb9f5aea4eaaaa8394b
Created December 17, 2014 13:42
Why common.rb should die
Recipe: openstack-network::common
* service[neutron-server] action restart[2014-12-17T13:41:14+00:00] ERROR: service[neutron-server] (openstack-network::common line 143) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '1'
---- Begin output of /sbin/start neutron-server ----
STDOUT:
STDERR: start: Unknown job: neutron-server
---- End output of /sbin/start neutron-server ----
Ran /sbin/start neutron-server returned 1; ignore_failure is set, continuing
================================================================================
@elliott-davis
elliott-davis / gist:9d1e1a7af00c38b698e5
Created December 11, 2014 19:09
ml2_conf_ovs.ini.erb
<%= node['openstack']['network']['custom_template_banner'] %>
[ml2]
# (ListOpt) List of network type driver entrypoints to be loaded from
# the neutron.ml2.type_drivers namespace.
#
# type_drivers = local,flat,vlan,gre,vxlan
# Example: type_drivers = flat,vlan,gre,vxlan
type_drivers = <%= node['openstack']['network']['ml2']['type_drivers'] %>