This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
""" | |
Example script creating a Heat stack and waiting for its completion by | |
receiving events over Zaqar. | |
Usage: | |
$ IDENTITY_API_VERSION=3 source devstack/openrc | |
$ create_stack_complete.py template.yaml stack_name | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
from oslo_config import cfg | |
import oslo_messaging | |
import logging | |
import eventlet |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# coding: utf-8 | |
from oslo_config import cfg | |
import oslo_messaging | |
import logging | |
logging.basicConfig() | |
log = logging.getLogger() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0. Create key | |
openstack --insecure keypair create feilong --public-key ~/.ssh/id_rsa.pub | |
1. Upload image | |
scp ~/Downloads/Fedora-Atomic-26-20170723.0.x86_64.qcow2 [email protected]:~/ | |
2. Create image (NOTE: Be careful the disk-format) | |
openstack --insecure image create fedora-atomic --disk-format qcow2 --container-format bare --property os_distro=fedora-atomic --file ./Fedora-Atomic-26-20170723.0.x86_64.qcow2 | |
3. Create cluster template |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Zaqar CORS wsgi example</title> | |
<meta charset='utf-8' /> | |
<link rel='stylesheet' href='http://yui.yahooapis.com/pure/0.6.0/pure-nr-min.css' /> | |
<script type='text/javascript' src='http://code.jquery.com/jquery-2.1.4.min.js'></script> | |
<script type='text/javascript'> | |
// Parameters: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DEFAULT] | |
transport_url = rabbit://stackrabbit:[email protected]:5672/ | |
debug=True | |
rpc_backend = rabbit | |
control_exchange = zaqar | |
notification_driver = messaging | |
pooling = True | |
auth_strategy = keystone | |
admin_mode = True | |
unreliable = True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
uwsgi --ini /etc/zaqar/uwsgi.conf --pidfile2 /tmp/uwsgizaqarmasterprocess.pid |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git push ssh://[email protected]:29418/openstack-ceilometer.git origin/stable/havana:refs/heads/stable/havana |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
openstack messaging message post <QUEUE_NAME> '[{"body":{"status":"DOWN","id":4}}]' --client-id 160139dd-897c-4835-abec-88ea3d8f7618 | |
openstack function create --name server_pager --file ./server_pager_new.py ab5db0d8-50b1-41b5-b9c6-b8d26b55e84f '{"source": "package"}' --entry server_pager.main | |
openstack messaging subscription create <QUEUE_NAME> trust+http://10.0.19.95:7070/v1/executions 360000 --options '{"post_data": "{\"input\": \"$zaqar_message$\", \"function_id\": \"<FUNCTION_ID>\"}"}' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from BaseHTTPServer import BaseHTTPRequestHandler, HTTPServer | |
import SocketServer | |
from urlparse import urlparse | |
resp = """[ | |
{ | |
"action": "talk", | |
"voiceName": "Russell", |
OlderNewer