Commit Graph

24 Commits

Author SHA1 Message Date
Jeremy Freudberg a449558ac0 S3 data source
* Create S3 data source type for EDP
* Support storing S3 secret key in Castellan
* Unit tests for new data source type
* Document new data source type and related ideas
* Add support of S3 configs into Spark and Oozie workflows
* Hide S3 credentials in job execution info, like for Swift
* Release note

Change-Id: I3ae5b9879b54f81d34bc7cd6a6f754347ce82f33
2018-07-02 14:27:46 -04:00
Mikhail Lelyakin 2d9c8abff5 Add pagination ability to Sahara-API
Pagination ability was added to api
v1.0, v1.1 and v2

Change-Id: I50fa225361617e835c314e873035704b9fe811d0
bp: pagination
2016-07-21 00:36:15 +03:00
Michael Ionkin 3766836d93 Fix glanceclient.v2.images
This patch overwrites migration from novaclient.images to
glanceclient.v2.images. Glanceclient uses Warlock library
and we want to be independent of this library because its 1.3.0
release had broken all our CI.
The idea is we speak to glanceclient which returns image dict,
then we transform this dict by adding our sahara related key-values.

Change-Id: I07e9875622ace6b0aa3cd098d36b2eeed59c6d54
co-authored-by: Vitaly Gridnev <vgridnev@mirantis.com>
2016-06-28 19:35:45 +03:00
Vitaly Gridnev d1f1d58fa9 base cluster verifications implementation
this change implements basic things requried for
cluster verifications:

 * API modifications;
 * DB implementation and conductor ops;
 * basic health checks;
 * periodic job.

Partially implements blueprint: cluster-verification
Change-Id: I1b975c9a5e5241c660de66a04bf559fc8f960873
2016-02-19 13:20:28 +03:00
Jenkins c6dc37c3fb Merge "[EDP] Unified Map to Define Job Interface" 2015-07-07 12:04:05 +00:00
Ethan Gafford b2c01f5d13 [EDP] Unified Map to Define Job Interface
This change adds an "interface" map to the API for job creation, such that
the operator registering a job can define a unified, human-readable way to
pass in all arguments, parameters, and configurations that the execution
of that job may require or accept. This will allow platform-agnostic
wizarding at the job execution phase and allows users to document use of
their own jobs once in a persistent, standardized format.

Change-Id: I59b9b679a650361ddcd30975891496fdfbabb93c
Partially Implements: blueprint unified-job-interface-map
2015-06-29 12:43:43 -04:00
Nikita Konovalov 7fb3469c6a Refactor exception is Sahara
All non-plugin exceptions are now located in one place. The constructor
usage is now brought to one pattern.

Change-Id: I794143889edf89a8ab79d0c6b8fb410da39081a0
2015-06-17 09:16:40 +00:00
Andrew Lazarev b558a41ff8 Hiding volumes from cluster output
Attached volumes is a technical information and should not be in
cluster output. Moreover this informatio is not used by Sahara in
most cases. Currently it is used by direct engine only to detach
volumes it attached before. After removing direct provisioning
engine "volumes" table should be removed too.

Change-Id: I10d99aed74be1126065be68082673a2e8aa1027c
Closes-Bug: #1459447
2015-05-28 12:30:17 -07:00
Sergey Reshetnyak 1f9d4089f9 Improve compatible with python3
Changes:
* use six.iteritems instead dict.iteritems
* use urllib in CDH API client
* filtering directories in HDP versionhandler because py3 creates
  __pycache__ directory

Unit tests result:

Ran: 750 tests in 13.4569 sec.
 - Passed: 669
 - Skipped: 5
 - Expected Fail: 0
 - Unexpected Success: 0
 - Failed: 76

Change-Id: Ib36b24f04a933c6e134bdace4994a5020ff4166b
2015-05-11 11:40:23 +03:00
Nikita Konovalov b05903568c Node Groups now have id field
The id of a Node Group in a cluster is required when you try to get the
Node Group name by id.

Change-Id: I405c402550264c30285e4e4635188ededcda3ed4
2015-03-13 09:21:06 +00:00
Vitaly Gridnev e3bec80a87 Add ability to get cluster_id directly from instance
It's a very small nit, which can make code better : )

Change-Id: Idebed6f53f19b2bc614b5d506e780cf065eda732
2015-02-13 13:40:30 +03:00
Kazuki OIKAWA c0131bcfd9 Added ability to access a swift from vanilla-1 hive
* Generates a cluster-scoped proxy-user and keystone TRUST
* Pass a proxy-user auth and trust id to hive-server using hive-site.xml

Partially implements: blueprint edp-hive-vanilla-swift

Change-Id: I65592421b29428d3e726aaf0aaa4977378849ef0
2014-11-13 17:08:55 +09:00
Andrew Lazarev 6129484e34 Added information about sahara settings to cluster
+ Added validation check on scaling using other engine

Change-Id: I3f36b949d1388f809c33334be6fcd0bdb30ade7a
Implements: blueprint cluster-persist-sahara-configuration
2014-09-12 14:08:22 -07:00
Michael McCune a539bcfdc9 Adding proxy user creation per job execution
Changes
* adding sahara.utils.proxy module
* adding functions to create and delete proxy users
* adding proxy user creation during job execution
* adding proxy user deletion during job execution status update
* adding sanitization for proxy configs from job execution
* adding unit test for proxy usage detection function

Partial-implements: blueprint edp-swift-trust-authentication
Change-Id: I551a14a3cb5320a27fc6104b35c3b9a08a03abda
2014-09-09 09:11:10 -04:00
Andrew Lazarev bf303ba683 Added ability to create security group automatically
Added ability to ask Sahara to create security group for node group. Feature
is only implemented in vanilla plugin 1.2.1 so far.

Partially implements: blueprint cluster-secgroups

Change-Id: I21d0196396bb966fe3d88f5445e98aebe90ad94b
2014-09-02 16:42:26 +04:00
Andrew Lazarev 37778d78bb Improved error handling for provisioning operations
1. Removed all error handling in provisioning engine and moved it
   to ops.
2. Implemented general logic on handling with deleted cluster

Implements blueprint error-handling-in-provisioning

Change-Id: Ia161dea1c726bd95157a279eb0f2917af2516b07
2014-08-14 16:39:22 -07:00
Vitaly Gridnev 8640637fcb Add translation support to service and missed modules
Added translations to files:
 * sahara/service/ops.py
 * sahara/service/periodic.py
 * sahara/service/validation.py
 * sahara/service/validations/base.py
 * sahara/service/validations/cluster_templates.py
 * sahara/service/validations/clusters.py
 * sahara/service/validations/clusters_scaling.py
 * sahara/service/validations/node_group_templates.py
 * sahara/service/validations/plugins.py
 * sahara/swift/swift_helper.py
 * sahara/tests/unit/service/test_instances.py
 * sahara/topology/topology_helper.py
 * sahara/utils/api.py
 * sahara/utils/openstack/heat.py
 * sahara/utils/rpc.py
 * sahara/utils/ssh_remote.py
 * sahara/utils/timing.py
 * sahara/utils/types.py
 * tox.ini

Change-Id: Ic389ec768e7f70ea2c2ffbf77d46bbebdf94348a
2014-07-31 13:20:58 +04:00
Michael McCune f9b0cd30b5 Adding sanitization for trusts in JobExecution model
Although there is no data model update to JobExecution there are some
minor changes to ensure that trust ids don't leak from the JobExecution
representations.

Changes
* adding sanitizing for trusts to the JobExecution Resource
* adding testing for trusts filter from JobExecution

Partially implement: blueprint edp-swift-trust-authentication
Change-Id: If88bba39efdab01195878a5b1d43bb6c975531b9
2014-07-24 19:14:57 -04:00
Alexander Ignatov 851f8a12d9 Fixed H405 pep8 style check
* H405  multi line docstring summary not separated with an empty line

Change-Id: I0e5239e7b2856f2104130accce1555e59dfa487d
2014-06-18 09:02:17 +04:00
Alexander Ignatov f5f6ceacc5 Fixed E265 pep8
* Fixed E265 block comment should start with '# '

Change-Id: I9ec81a163e847c4dfb303bf11129d0b76c8a1506
2014-06-16 08:39:59 +04:00
Trevor McKay 3367d9c363 Add a custom filter method to scan wrapped dict results
Basic filtering is available via Resource._filter_fields and
Resource._children but partial filtering of fields is not supported.

This change allows a Resource to define custom sanitization methods
for individual fields. The specified method is applied after the
field has been generated.

For nested structures, particularly when elements are not Resource
types, it is easier to scan the field after generation and remove
specific elements than it is to modify the recursive descent already
implemented in to_wrapped_dict().

JobExecutions are filtered with this mechanism to set swift credential
values to empty strings and to remove the 'conf' section reported
for running Oozie actions.

Closes-Bug: #1300291
Change-Id: Ifb0b99a3e13d40306139b0d0021aead69e870205
2014-04-03 16:08:42 -04:00
Trevor McKay fc64317303 Filter 'fields' from JobExecutions returned from REST api
The 'job_configs' field will contain swift credentials used by Hadoop
when running jobs that use swift data sources.  The 'extra' field may
contain a token for use with neutron.

The current filtering mechanism in Sahara allows filtering fields by name,
but it's not set up to support programmatic filtering of things which
can be variable. It may not be necessary to filter out 'job_configs'
entirely from a security perspective, but there currently is no other
option when a field might or might not contain particular values.

Additionally, sensitive information could potentially be passed in 'args'
within 'job_configs' and it is impossible to know anything about the
content of that field.

Closes-Bug: #1273661
Change-Id: Idb2e68a2d42e45bab04c62c740cbbaf5e51b2719
2014-03-30 01:32:12 +04:00
Trevor McKay 4da5dbf735 Filter credentials in jobs returned from REST api
The 'mains' and 'libs' elements of a Job contain references
to JobBinary objects, which can contain credentials in the
'extra' field.  Filter 'extra' from 'mains' and 'libs' when
returning a wrapped Job object.

Closes-Bug: #1272452
Change-Id: Ieccadbbda1f081595374469cb938b7bffbc08e17
2014-03-25 12:37:30 -04:00
Trevor McKay d39024a207 Move the savanna subdir to sahara
Rename the subdirectory and replace all instances
of "import savanna" with "import sahara" and all
instances of "from savanna" with "from sahara".

* Replaced mock patches like mock.patch('savanna...
* Updated config generator script
* Renamed entry points in setup.cfg
* Hacking checks also fixed
* Manual renaming in alembic scripts to force work migrations
* Fix doc building
* Renamed itests directories
* Some changes in gitignore
* Removed locale dir after rebase

Co-Authored-By: Alexander Ignatov <aignatov@mirantis.com>

Change-Id: Ia77252c24046c3e7283c0a7b96d11636020b949c
Partially implements: blueprint savanna-renaming-service
2014-03-18 16:38:36 +04:00