Commit Graph

72 Commits

Author SHA1 Message Date
Andrew Forrest ccd711ed9f Supply horizon-compatible Web UI
blueprint horizon-webui

(Auto-linking to blueprint either doesn't work for this project
or requires additional info not prescribed. Here is full link:
https://blueprints.launchpad.net/inception/+spec/horizon-webui

This change is the initial commit of the third and final part
of the horizon-compatible web UI for Inception Cloud (the others are
[1] and [2]).  This commit draws heavily from the horizon tutorial[3]
and from the existing implementation for instance management[4] (the
latter because inception cloud management is by analogy a more complicated
version of it).

Because this effort seeks to operate alongside OpenStack in the
architectural and coding style of OpenStack but require minimal internal
changes to OpenStack it relies on a separate API server from nova
compute.  In addition, this meant that the entire horizon stack could not
be utilized directly and a layer had to be chosen at which to deviate.
Accordingly the code is more verbose (because of horizon generality) than
it might otherwise be.

Installation of this application proceeds by
1. installing the inception package
2. starting the inception API server per INSTALL.md
3. modifying a single line in the horizon config per INSTALL.md

[1] https://review.openstack.org/#/c/47008/
[2] https://review.openstack.org/#/c/58835/
[3] http://docs.openstack.org/developer/horizon/topics/tutorial.html
[4] https://github.com/openstack/horizon/ then
    openstack_dashboard/dashboards/project/instances

Partially implements: blueprint horizon-webui

Change-Id: Id14b30bbb5eafeac928d8e94aeb0553ae52fb661
2013-12-05 17:25:32 +00:00
Andrew Forrest e505d194d3 Support use of token value in place of password.
blueprint horizon-webui

(Auto-linking to blueprint either doesn't work for this project
or requires additional info not prescribed. Here is full link:
https://blueprints.launchpad.net/inception/+spec/horizon-webui

While python-novaclient will re-authenticate using an internally
saved copy of an authorization token, this capability is not
exposed to its API user requiring the use of a password whenever
creating a Client object.  In order to authenticate requests made
on behalf of a web (horizon) user this capability needs to be
utilized as the horizon web app has only a token once the user
logs in.  This change depends on the structure of the client
and is the first place to look for problems once the underlying
API software is revised.

Partially implements: blueprint horizon-webui

Change-Id: Ifa9cb7877eabff1514cb2272407d6daf08beef7f
2013-11-27 10:05:03 -08:00
Andrew Forrest bc6b710555 Provide simple RESTful API + WSGI Server
blueprint horizon-webui

(Auto-linking to blueprint either doesn't work for this project
or requires additional info not prescribed. Here is full link:
https://blueprints.launchpad.net/inception/+spec/horizon-webui)

This commit implements the minimal RESTful API and WSGI application
for exposing Inception Cloud's Orchestrator behavior over the network.
It is a necessary component for providing a web user interface to
Orchestrator via OpenStack's horizon project as described in the
Blueprint identified above.

Change-Id: I8430b008c6cbabc91258da31d01a05a5521462d0
2013-10-18 11:29:45 -07:00
Changbin Liu 65806429f5 Fix flavor type bug in config opts
flavor is StrOpt instead of IntOpt

Change-Id: I8c2269ff940561821a7f24097f204d40f83f07c9
2013-09-25 17:15:48 -04:00
Changbin Liu 02b6284ec2 Rename "LOGGER" to "LOG"
Align with OpenStack projects

Change-Id: Ie30b2819bce754650f3afa293935c2a0b551c217
2013-09-22 15:40:45 -04:00
Changbin Liu 7c8c4b9a65 Change arguments "image" and "flavor" from ID to name
Make orchestrator easier to use. Specify human-readable names instead
of resource IDs.

Change-Id: I165761c38756e080aaacea7d2836d1e6c92369d8
2013-09-19 13:37:02 -04:00
Changbin Liu e76ace1914 Add re-raise argument to start() and cleanup()
To enhance the usability of the Orchestrator class as a reusable
component (e.g., used by WebUI), it should not catch and handle
certain exceptions, without at a minimum re-raising them.

Change-Id: I4ff8320f3a275fbdbe7cf3a21c217f1cf59ddacb
Fixes: bug #1226193
2013-09-18 00:14:29 -04:00
Scott Daniels 9014b2388e Force tty (stdin) closed on ssh commands.
Adding the -n to the ssh command forces ssh to redirect stdin from /dev/null
and prevents the remote processes from blocking waiting for user (tty) input.

Change-Id: Ic659c951926e81eacb0db72c6ff0668b5bd38167
2013-09-05 11:21:06 -04:00
Changbin Liu a5c4ac10f7 Remove restriction # of workers <= 5
Chef cookbooks and environment have been updated accordingly

Change-Id: I00d5caf72e750b8904e1382fa5c844acbafb795c
2013-08-31 20:01:03 -04:00
Changbin Liu 1f964175f7 Add OpenFlow/SDN support for VXLAN mesh-topology networks
Change-Id: I81c09c98fd5f19b69bd1357c85d8a3117092ed34
2013-08-30 14:36:33 -04:00
Changbin Liu 641c97e2a4 Add license to *.py files
Change-Id: I8efb89fc65ed3da7bfef8c2573bff784f2c21bcc
2013-08-26 12:57:56 -04:00
Changbin Liu 7d4402323a Remove WebUI TODO
It is planned to be moved into launchpad blueprint

Change-Id: I8d50bc683ffaa123eb6c3ddd44ddb750cf1485a2
2013-07-17 13:19:00 -04:00
Changbin Liu 8311e70e9d Add a CONF option for chefserver image id
The chefserver image (snapshot) has pre-installed chef software
packages to speed up chef server deployment

Change-Id: I01bd30947ba6191869411b175e6cfb36b02b322f
2013-07-17 12:10:43 -04:00
Changbin Liu 3d62045d44 Use logging instead of print
- log module supports oslo.config

- orchestrator executable code is split into bin/

Change-Id: Ia1bc509c09c6bd4cc4734d950ee077ae2be30a5b
2013-07-17 10:52:37 -04:00
Changbin Liu 5d2bdcaccb Remove hardcoded '-' as concatenation char between prefix and name
Change-Id: I47e2f9ae2f7556346bb0186689bd394b2fdd4e6a
2013-07-15 16:59:56 -04:00
Changbin Liu 915f55d14b Change chef-repo URL to AT&T's
Change-Id: If31c35f6851d776fff2c25887887d65bf4136b57
2013-07-10 14:37:04 -04:00
Changbin Liu cd094f4e8f Move FuncThread to utils.wrapper
utils.wrapper is where wrappers of various Python standard libraries
reside

Change-Id: I7b3cde5af16596a6bc3e2e9820f456711bb5e070
2013-07-09 15:45:29 -04:00
Changbin Liu d0f14b4b3b Cleanup oslo.config
- Remove config opts and orchestrator ctor document redundancy

- Make "atomic" an attribute of orchestrator

- A bit reordering of opts

- Cleanup and rename inception.conf.sample

- Some other minors: Authors, setup.py

Change-Id: I9c501acf4a11c2fc0056130bd163bbccd2ec9e24
2013-07-09 15:42:42 -04:00
Andrew Forrest 03ed5b7e9f Incoporate oslo.config facilities in Inception
Convert Inception code to use a configuration file and command line options as
processed by oslo.config.

+ orchestrator modified to use oslo.config for options
+ sample config file introduced
+ dependency on oslo.config added to setup.py
+ version string moved from setup.py to module init for ready access
  for --version and others

Implements: blueprint Inception Configuration Blueprint
Change-Id: I984700867d8ddf5ee1602cc4ed6608f36a38a6be
2013-07-03 16:30:41 -07:00
Changbin Liu c3b18879b8 Order module imports by alphabetical sequence
Change-Id: Id77e1fe3d09f5fde75d93ed3b049ab5dec888f97
2013-06-27 23:30:49 -04:00
Changbin Liu 3bcaa1cae4 Mark TODOs and modify some comments
Change-Id: I69f1da6283f9df88b10044e8d92f3c7f3b079cc1
2013-06-27 23:23:35 -04:00
Changbin Liu 14668f93e2 Change configs (image id, flavor, pool) for agave cluster
Change-Id: I1b46f39af63603129e5e269ee1805b9f1290a788
2013-06-26 19:02:48 -04:00
Changbin Liu 371b0fa47d Fix switch kernel bug and multi-thread issue
Need to purge image and headers as well; add some sleep time for chef
attribute propagation

Change-Id: I619acea2fd745a1dd1dbd30fcdd1928cd37676d5
2013-06-20 18:01:25 -04:00
Changbin Liu 0276765738 Add floating ip pool option
Change-Id: I2ef44b00e16db3c50004c4059ed7525899e78aad
2013-06-20 00:01:44 -04:00
Changbin Liu 307400e5c1 Change slightly to ssh-keyfile and TODOs
ssh-keyfile string templat is moved to userdata.sh, and userdata.sh is
renamed to userdata.sh.template

Change-Id: I704192cafe210c90c829c83af6b219786996dad0
2013-06-11 15:30:37 -04:00
Yun Mao 72d5811bb9 Allow extra ssh public key injection
The extra ssh public key filename is specified by the extra
command line option --ssh-keyfile. The key is injected by the
userdata script if given.

Change-Id: Idf1e2dee15450f6f4b0bbeea31c3a45b82508af0
2013-06-11 13:51:02 -04:00
Changbin Liu 50adb56142 Add userdata done test
Via /etc/inception folder existence

Change-Id: Ia7a1cd3433f2801b71130b0b7c79821f2aa4aad9
2013-06-10 22:41:51 -04:00
Changbin Liu 85fed94b85 Fix multple-retry bug
_worker_ips and _worker_names were not cleared upon each retry

Change-Id: Ibab069f3f483349d60e6d1321d8bcf367721c652
2013-06-05 19:00:22 -04:00
Changbin Liu daaa33c275 Change image (u1204-130531-gv) id for IAD1
Change-Id: Ic2830762b7d50268144807905c2a536b6bfbc9a9
2013-06-05 17:01:13 -04:00
Changbin Liu 63efc18875 Revert image snapshot
u1204-130529-gvc (chef packages preinstalled) does not work well with
OpenStack cookbooks (RabittMQ issue). Use u1204-130531-gv instead.

Change-Id: I2c9e5cb89baf572785ebeff95d6fef9cc92e017d
2013-06-04 13:01:41 -04:00
Changbin Liu ed4e34d2f3 Fix multi-thread issues
Add exception handling for multi-threads and main thread.  Change
default mode from "parallel" to "sequential".

Change-Id: I91c85f00c4e8e1a90e46cd41e344d5e246ac85e4
2013-05-31 22:17:03 -04:00
Changbin Liu ede087ff4b Change default snapshot and flavor for DFW2
Medium (and Small) instances does not work well with snapshot
u1204-130529-gvc (about 2GB size, error info: "ImageTooLarge").
Changed to Large (4) instance.

Change-Id: I07cf2b941882f527202f6fb8c2beb2681df9114e
2013-05-31 22:16:55 -04:00
Changbin Liu f5898c9177 Fix that chefserver scripts are hardcoded twice
The two are merged into one

Change-Id: I0faca4b7357baeacacf5e6fbddccad75b339e7d3
2013-05-30 11:56:26 -04:00
Changbin Liu 0b5385ec3c Add pre-install chef packages script
Packages are already installed on image snapshot u1204-130529-gvc
(38b0b5a5-7dda-4fd1-b53a-00ba47eacc16). This decreases the time to
setup chefserver

Change-Id: I48022ce1a66f6730681ee403feaab9d00915a45f
2013-05-30 11:56:26 -04:00
Changbin Liu b1c6f70719 Increase timeout
default timeou=999999 seconds, ~infinity

Change-Id: I61bb2c676a4f69da4db235751f96ee3c2da676b8
2013-05-29 20:21:42 -04:00
Jenkins 86be29071a Merge "Provision controller and workers" 2013-05-24 21:15:53 +00:00
Yun Mao 3854ac006d Provision controller and workers
Change-Id: I44d542c5b2db08921e275fcd0e2a93b77e8a7f46
2013-05-24 17:14:57 -04:00
Changbin Liu 2a9b402691 Run an empty list of chef-client
Ensure that node attributes are properly propagated

Change-Id: Ibba6c26e914ba4fdbd2d0d0d67a5528ec6150bad
2013-05-24 13:53:40 -04:00
Changbin Liu 9dab6cc172 Refactor code
_add_recipe and _add_run_list are combined, _run_chef_client are
modified, and multi-thread code are put in a single function.

Change-Id: I12c2418546f366b484acc1258d10cc5b6554af8a
2013-05-23 15:07:09 -04:00
Changbin Liu deaf72210d Add multithread support for parallelizable ssh
Specifically in functions: _checkin_chefserver(), _add_recipe() and
_run_chef_client()

Change-Id: I6eddbe0fea34ce935432adcf4b34f43975f5779b
2013-05-22 23:53:06 -04:00
Yun Mao 4b00c061e5 Make add run_list a separate function
Change-Id: Ib4c2b58e8966c1988c0ff59053ced836a75fd363
2013-05-22 23:31:33 -04:00
Changbin Liu 12aa04b46d Consolidate code of two functions
Move same code of _deploy_network_vxlan and _deploy_dnsmasq into a new
function: _add_recipe

Change-Id: Ied2f27f42772acd4485c43cf44b8cd12a150be93
2013-05-22 22:48:39 -04:00
Changbin Liu c31abdecc1 Change some print Info
Minor change

Change-Id: Ibf5f4b89164e0a92cd3234ad837006731aa13169
2013-05-22 22:04:58 -04:00
Changbin Liu 62d3598e6a Add cleanup for orchestrator
Now it can automatically find out what prefix is used and which
inception cloud to cleanup based on given prefix

Change-Id: I2d87dd20136784fd4f32a1c547f1daf366dd2c47
2013-05-22 21:43:00 -04:00
Changbin Liu 6ba04f249b Rename git_chef_repo and git_chef_repo_branch
"git-" prefix is removed

Change-Id: Ib3f47b1eea8c8044b85fdfba08739d84f30d2e75
2013-05-21 11:54:56 -04:00
Changbin Liu 603d1d3b6f typo fix
git_chef_repo and git_chef_repo_branch

Change-Id: Iaf889e4e4fa689f46aeaa7b24c7320c6e8edcdc8
2013-05-21 11:44:39 -04:00
Changbin Liu 4f80e53970 VXLAN and DNS deployment
Deploy VXLAN and DNS using recipes in cookbook-openvswitch. Btw, fix a
typo in utils/cmd.py

Change-Id: I0ae7b19f84b05bcfb777d1d69a2231e323a861cc
2013-05-21 11:19:56 -04:00
Jenkins e0e39c0b07 Merge "Add new options to customize chef repo" 2013-05-21 15:16:11 +00:00
Jenkins 03e776ec1e Merge "Make chef server setup explicit" 2013-05-21 15:15:37 +00:00
Yun Mao 0b793d8f82 Print more useful information after provisioning
Print not only gateway IP, but also chef server and dashboard URLs.

Change-Id: Ic7378c5d081f8d5362f52e730252262646cdfcbf
2013-05-20 18:44:22 -04:00