Commit Graph

15 Commits (f416aa695544fafe09a7be02f34cebc0f4d718b4)

Author SHA1 Message Date
Davanum Srinivas 17c5711c55 Remove imports from oslo namespaces
Oslo team is recommending everyone to use the direct imports and
not use the Oslo namespaces. So switch all our code to use oslo_*
instead of "from oslo." or "import oslo" or "from oslo"

NOTE: some of the tests still have mocks referring to oslo.utils
@mock.patch('oslo.utils.timeutils.utcnow')
as the tests break otherwise. We should do this later.

Closes-bug: #1419385
Change-Id: I8e3fbeb833cddc3f55674a0e781ffe69d5033ad4
8 years ago
Kennan 84e73e5a9a Fix the stamp parameter in db-manage
Closes-Bug: #1414521
Change-Id: I25125eaa1efa86c4c66ee1dbe68f0545ffeba593
8 years ago
Steven Dake 9784b41693 Log error and exit if templates are not installed
If Magnum attempts to create a bay without Heat templates installed,
a non-descript error is displayed.  This patch changes that behavior
so the magnum-coductor process will only start if the template is
installed.

Change-Id: I188e1f34feb4d6f153ab272eb60be05242b7142a
Closes-Bug: 1410473
8 years ago
OTSUKA, Yuanying 6ad1fb26a4 Implement creating Bay using heat
Co-authored-by: Steven Dake <sdake@redhat.com>
Implements-blueprint: backend-bay-heat-kube

Change-Id: Ia544d8bd3bc03afa900247b8da09675c0c6aec71
9 years ago
Davanum Srinivas df4e64186e Flesh out some more docker container methods
First cut of Docker container creation and start should be working now

Tested using the REST API:
curl -i -X POST -H 'X-Auth-Token: 1b238d90cd0645a39a626581cf0c9f19' \
     -H 'Content-Type: application/json' \
	 -H 'Accept: application/json' \
	 -d '{"image_id": "cirros", "name": "mycontainer"}' \
	 http://127.0.0.1:9511/v1/v1/containers

curl -i -X PUT -H 'X-Auth-Token: 1b238d90cd0645a39a626581cf0c9f19' \
     -H 'Content-Type: application/json' \
	 -H 'Accept: application/json' \
	 -H 'User-Agent: python-magnumclient' \
	 http://127.0.0.1:9511/v1/containers/4e19a981-057f-4d55-9aaf-d12c06e6430a/start

And the magnum CLI:
echo '{"name":"mycontainer", "image_id":"cirros"}' | magnum --debug container-create
magnum --debug container-start --id c6d6c759-9875-4dd4-aaa3-619799015c1d

Change-Id: Ib7a46d95d2d89cd8479bb0a318a3c9efaf23f187
9 years ago
Steven Dake 4aac587695 Reference proper file in cmd.conductor
The cmd.conductor was referencing a file that was renamed by a previous
commit.  This resulted in the conductor not running.

Change-Id: Id3e08334d106cf8a1f6cc94c4905d42095a0546d
9 years ago
Steven Dake 9d46b771c5 Rename backend to conductor
The backend is a bad name for a process, so instead call it the conductor.

Change-Id: Iaeb574b9754fe2635a2b082a99216337130a19f9
9 years ago
Steven Dake 54411f6265 Remove conductor
Remove conductor.  The backend will replace the conductor as the process
name to be more consistent with other OpenStack projects.

Change-Id: If69557b7ca02e48c65372cbb200d2f648613778e
9 years ago
Steven Dake 6349b4e384 Add RPC backend service
This uses a simplified RPC model while integrating with the
versioned objects serializer.

bay-create is handled by the backend.
bay-list is handled by the RPC service.

Change-Id: I384994584ad7f928df9366a2e6f677951a450e40
9 years ago
Steven Dake 3a7e9fb435 Remove stray print which caused magnum-db-manage to fail
A stray debug print was causing magnum-db-manage to fail because the
configuration file was read after the print.  The print printed out
configuration information.

Change-Id: I077aaa80fad40a10148bcab93c5278e5871e899d
9 years ago
Steven Dake bb2546f0eb Copy Ironic's database model codebase
The Ironic codebase is pretty simple for database access.  This work
leads into the introduction of versioned object technology from nova
and ironic that will be entering oslo:

https://review.openstack.org/#/c/127532/

This will drastically speed up the process of implementing moving the
RPC objects across the network.

Change-Id: I38aa451b658b66f5b6f10ced03ea2e0355af4ecd
9 years ago
Steven Dake 5cd9ed8332 Add Heat and Ironic Bay placeholder Handlers
The Ironic backend boots a basic image which contains k8s and
docker as well as the APIs automatically configured to start
on boot.

The Heat backend boots a Heat template using Nova to provide k8s
and docker fully preconfigured.

Change-Id: I516ba00d7850f45ad4d17e559690ee904b786f18
9 years ago
Steven Dake 9442e40702 Add backend processor for AMQP
Backend processors execute the ReST API using a specific backend.  For
example, docker implements the container backends.  k8s implements the pod
and services backends.  If at some later date, someone wants to implement
a fully native backend, that would be possible.  In the short term (next 4-6
weeks) I'd like to focus on backends using k8s and docker only rather then
trying to get native to work.

Change-Id: I77abde65dfe03e12f2931854da52a69f5e618d93
9 years ago
Steven Dake ea8cbaa077 Add initial conductor API and service
Add an initial conductor API and service.  This service allows
operation on the four object types -> bays, pods, services, and
containers and allows the ability to list, read, write, or delete
those objects in the database.  The implementation of the
list/read/write/delete is incomplete and should come in a follow-up
patch.

Change-Id: I60e9070e4b5aeaeddba67233b99dd0e3a3cffe22
9 years ago
Steven Dake 14707dd546 Create a ReST API entrypoint
This creates a server entrypoint for running the Pecan+WSME
infrastructure.

Change-Id: I58bdeea7971f0f562e3d7a5542740283cb910a7b
9 years ago