Skip to content

Instantly share code, notes, and snippets.

View danehans's full-sized avatar

Daneyon Hansen danehans

View GitHub Profile
@danehans
danehans / gist:dd702f77ffbe7a3b98f8
Last active August 29, 2015 02:17
magnum pod and svc verification
$ kubectl get minions
NAME LABELS STATUS
10.0.0.6 <none> Ready
[minion@k8-wljn7oevns-0-q5a5yxn24y6k-kube-minion-3niub53a5fq6 ~]$ kubectl get pods
POD IP CONTAINER(S) IMAGE(S) HOST LABELS STATUS CREATED
web 10.100.59.2 web larsks/thttpd 10.0.0.6/ name=web Running 4 hours
$ kubectl get services
NAME LABELS SELECTOR IP PORT(S)
kubernetes component=apiserver,provider=kubernetes <none> 10.254.0.2 443/TCP
kubernetes-ro component=apiserver,provider=kubernetes <none> 10.254.0.1 80/TCP
DEBUG (httpclient:105) curl -i -X POST -H 'X-Auth-Token: dc52026c0d2d449bbaeb532df91118ce' -H 'Content-Type: application/json' -H 'Accept: application/json' -H 'User-Agent: python-magnumclient' -d '{"ssh_authorized_key": null, "http_proxy": null, "docker_volume_size": "3", "https_proxy": null, "no_proxy": null, "external_network_id": "0521ceb2-fe2e-4b14-a39f-5fbc5d99f66b", "labels": ["flannel_network_cidr=10.101.0.0/16,flannel_network_subnetlen=26,flannel_use_vxlan=true"], "network_driver": "flannel", "name": "k8s", "fixed_network": null, "image_id": "fedora-21-atomic-3", "coe": "kubernetes", "flavor_id": "m1.small", "keypair_id": "danehans", "dns_nameserver": "172.29.74.154", "master_flavor_id": null}' http://172.29.74.86:9511/v1/baymodels
$ magnum baymodel-show k8s
+---------------------+-------------------------------------------------------------------------------------------------+
| Property | Value |
+---------------------+-------------------------------------------------------------------------------------------------+
| http_proxy | None |
| fixed_network | None |
| apiserver_port | None |
| docker_volume_size | 3 |
| image_id | fedora-21-atomic-3 |
| no_proxy
@danehans
danehans / gist:bd0560bb9c5704f3ba40
Last active September 3, 2015 22:31
magnum cnm patch testing
# The patches should be applied in the following order:
$ git log --oneline
a315e30 WIP: Refactors Heat templates for Container Networking Model
0fa3419 WIP: Adds labels support
abf2718 WIP: Adds Combined Support for Container Network Model
4eac317 Merge "Fix the hard-coded etcd cluster size"
# Note ptch 0fa3419 & abf2718 modify the revision history
# In order for the patches to work properly, you need to modify:
# magnum/db/sqlalchemy/alembic/versions/1481f5b560dd_add_labels_column_to_baymodel_table.py
@danehans
danehans / template_definition.py
Created September 4, 2015 19:37
magnum labels
$ magnum bay-show k8s
+--------------------+------------------------------------------------------------+
| Property | Value |
+--------------------+------------------------------------------------------------+
| status | CREATE_COMPLETE |
| uuid | ad2b8542-8c2d-437d-9874-6fbc6a653e14 |
| status_reason | Stack CREATE completed successfully |
| created_at | 2015-09-04T19:21:48+00:00 |
| updated_at | 2015-09-04T19:23:12+00:00 |
| bay_create_timeout | 0 |
# Automatically generated for Debian scripts. DO NOT TOUCH!
[client]
host = localhost
user = debian-sys-maint
password = FCt5YjU6LunnuHZD
socket = /var/run/mysqld/mysqld.sock
[mysql_upgrade]
host = localhost
user = debian-sys-maint
password = FCt5YjU6LunnuHZD
@danehans
danehans / template_definition.py
Created September 4, 2015 23:28
magnum templ_def.py
# Copyright 2014 Rackspace Inc. All rights reserved.
#
# 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
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
$ magnum baymodel-show k8s
+---------------------+-----------------------------------------------------------------------------------------------------------------+
| Property | Value |
+---------------------+-----------------------------------------------------------------------------------------------------------------+
| http_proxy | None |
| updated_at | None |
| master_flavor_id | None |
| fixed_network | None |
| uuid | feb2ce7
@danehans
danehans / gist:2b3c8d2cce2a4087d0ac
Last active September 24, 2015 21:21
magnum testr fail
Failed to import test module: magnum.tests.unit.test_opts
Traceback (most recent call last):
File "/opt/stack/magnum/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 456, in _find_test_path
module = self._get_module_from_name(name)
File "/opt/stack/magnum/.tox/py27/local/lib/python2.7/site-packages/unittest2/loader.py", line 395, in _get_module_from_name
__import__(name)
File "magnum/tests/unit/test_opts.py", line 18, in <module>
from magnum import opts
File "magnum/opts.py", line 28, in <module>
import magnum.conductor.handlers.bay_conductor
@danehans
danehans / heat-engine-log
Last active September 30, 2015 22:32
heat nested templates
2015-09-30 22:20:36.763 DEBUG heat.engine.scheduler [-] Task _check_for_completion running from (pid=11440) step /opt/stack/heat/heat/engine/scheduler.py:223
2015-09-30 22:20:36.784 INFO heat.engine.environment [-] Registering file:///opt/stack/magnum/magnum/templates/docker-swarm/master.yaml -> file:///opt/stack/magnum/magnum/templates/docker-swarm/master.yaml
2015-09-30 22:20:36.784 INFO heat.engine.environment [-] Registering file:///opt/stack/magnum/magnum/templates/docker-swarm/node.yaml -> file:///opt/stack/magnum/magnum/templates/docker-swarm/node.yaml
2015-09-30 22:20:36.785 DEBUG heat.engine.scheduler [-] Task _check_for_completion complete from (pid=11440) step /opt/stack/heat/heat/engine/scheduler.py:229
2015-09-30 22:20:36.786 INFO heat.engine.environment [-] Registering file:///opt/stack/magnum/magnum/templates/docker-swarm/master.yaml -> file:///opt/stack/magnum/magnum/templates/docker-swarm/master.yaml
2015-09-30 22:20:36.786 INFO heat.engine.environment [-] Registering file:///opt/stack/magnum