Skip to content
This repository has been archived by the owner on May 22, 2023. It is now read-only.

Feature/plugin data store #292

Merged
merged 18 commits into from
Jul 31, 2014
Merged

Feature/plugin data store #292

merged 18 commits into from
Jul 31, 2014

Conversation

albertshau
Copy link
Contributor

store for uploading and managing plugin resources like cookbooks, scripts, etc.

their plugins. Types of resources a plugin supports will be
defined by the plugin. For example, the 'chef-solo' automator
type will specify that it supports 'cookbook', 'databag',
and 'role' resource types. A tenant admin will then be able to
upload resources for cookbooks, databags, and roles with a given
name and version for identification.

Resource versions can then be activated, meaning that version
of the resource will be pushed to provisioners when a special
'sync' call is made by the admin.

Implementation includes a PluginResourceMetaStoreView that keeps
track of what resources exist and which versions are active.
There is then a PluginStore that provides input and output streams
for writing to and reading from whatever backend is used to store
the plugin resources. System admins can implement the PluginStore
class to support different storage backends, with Loom including an
in-memory backend for tests and a local file system backend, with
the idea that we would add support for distributed systems that
would work better for HA purposes.
to a map instead of a flat list so that versions for a resource
are grouped together. Also changed active filter to be a
parameter instead of a separate call with a separate signature.
of activating it, and each resource has a status which is inactive,
staged, active, or unstaged.
instead of deleting from the table for historical purposes.
…a-store

Conflicts:
	server/src/test/java/com/continuuity/loom/BaseTest.java
@nitinmotgi
Copy link
Contributor

@albertshau has documentation been updated for this ?

@albertshau
Copy link
Contributor Author

good reminder... I will update them

.. include:: /rest/rest-links.rst

Using the Loom admin REST API, you can upload and manage plugin resources.
Each tenant admin can upload resources that plugins can use, such as chef cookbooks

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be better to define a plugin first, and then talk about plugin resources, etc.

import com.google.common.base.Preconditions;

/**
* Metadata about a plugin resource, including a unique id, a name, a version, and status.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see a unique id anywhere in the implementation.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, removed.

"deleted BOOLEAN, " +
"create_time TIMESTAMP," +
"delete_time TIMESTAMP )",
dbConnectionPool);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This table probably should have a primary key since its counterpart in MySQL has it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@poornachandra
Copy link

I'm done with my review, please address comments.

…a-store

Conflicts:
	CHANGELOG.md
	server/src/main/java/com/continuuity/loom/store/guice/StoreModule.java
	server/src/test/java/com/continuuity/loom/BaseTest.java
with refactoring store guice modules, renaming classes and
variables.
albertshau added a commit that referenced this pull request Jul 31, 2014
@albertshau albertshau merged commit 43f7e57 into develop Jul 31, 2014
@wolf31o2 wolf31o2 deleted the feature/plugin-data-store branch August 13, 2014 02:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants