Skip to content
This repository was archived by the owner on Sep 16, 2024. It is now read-only.
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
62 commits
Select commit Hold shift + click to select a range
adb57d8
Update README.md
rjrudin Oct 12, 2015
5c4f7ed
#62 Deploying amps after modules database created
rjrudin Oct 14, 2015
ce8dc3f
Fix ml-init for null case, and chmod gradlew
Oct 14, 2015
f3b3411
Merge pull request #63 from grechaw/fix-ml-init
rjrudin Oct 15, 2015
e3eb9cd
#61 Can now create replicas for a given database
rjrudin Oct 16, 2015
c5afcbe
#61 Now deleting replicas based on a database name
rjrudin Oct 16, 2015
06c30e2
#61 Small tweak to make sure no work is done if the maps are empty
rjrudin Oct 16, 2015
7b11ac3
#61 Allow for database names and replica counts to be set as a comma-…
rjrudin Oct 21, 2015
7114500
Updated changelog
rjrudin Oct 26, 2015
5370450
Added convenience constructor for DeployDatabaseCommand
rjrudin Oct 26, 2015
277c836
Added SetSslFipsEnabledCommand
rjrudin Nov 27, 2015
1b4584f
Merge remote-tracking branch 'origin/master' into dev
rjrudin Nov 27, 2015
4f8558e
#67 Now supporting triggers
rjrudin Nov 27, 2015
beff0cf
Updated changelog
rjrudin Nov 27, 2015
e1c8ee9
Finish issue-68
rjrudin Nov 30, 2015
e928c0e
#68 Slight modification to avoid any chance of an infinite loop
rjrudin Nov 30, 2015
9f148a5
#68 Ack, need alerts to be after CPF
rjrudin Dec 1, 2015
d274daa
Can now delete all scheduled tasks easily
rjrudin Dec 5, 2015
bfe670f
Can now delete all flexrep configs
rjrudin Dec 5, 2015
303cb50
Can now delete all alert configs
rjrudin Dec 5, 2015
02269a7
Logging an error when unable to clear a database
rjrudin Dec 6, 2015
c123539
Logging user and path on all requests
rjrudin Dec 6, 2015
fc450c3
Added buildFromSystemProps to ManageConfig
rjrudin Dec 7, 2015
e690499
#69 Added test to confirm that setting modulesDatabaseName should work
rjrudin Dec 9, 2015
5ac6df1
Merge branch 'dev'
rjrudin Dec 9, 2015
3f84af1
Added methods for enabling/disabling flexrep targets
rjrudin Dec 9, 2015
f1c5a31
Merge branch 'master' into dev
rjrudin Dec 9, 2015
8ea4f9b
More disable/enable methods for TargetManager
rjrudin Dec 9, 2015
c5ee867
Removing OBE command
rjrudin Dec 10, 2015
5688475
Added property to LoadModulesCommand for specifying more binary exten…
rjrudin Dec 10, 2015
522b72a
Added disableAll/enableAll to ConfigManager
rjrudin Dec 10, 2015
1f4f30f
Allowing for DocumentFormatGetter to be overridden
rjrudin Dec 10, 2015
3f60637
Don't need to override this now that group-id is part of the resource…
rjrudin Dec 13, 2015
1561e27
Finish ml-objects
rjrudin Dec 13, 2015
481e299
Finish resource-api
rjrudin Dec 17, 2015
d118c4f
#72 Fixing issue where "is deleted" wasn't saved in the DeleteReceipt…
rjrudin Dec 20, 2015
abde0c6
#72 Updated changelog
rjrudin Dec 20, 2015
697e22b
Reworking how mlModulePermissions is processed
rjrudin Dec 20, 2015
9a99972
Finish api-sandbox
rjrudin Dec 23, 2015
857c4b6
Updated imports
rjrudin Dec 23, 2015
6f85e1d
Repackaged to com.marklogic
rjrudin Dec 23, 2015
92f6d99
Added a limit for # of retries
rjrudin Dec 23, 2015
616e03b
#73 Added support for a FileFilter on AppConfig
rjrudin Dec 27, 2015
8f27bc1
Throwing in a few defaults on AppConfig
rjrudin Dec 29, 2015
21f53d7
Added bintray support
rjrudin Dec 29, 2015
817ee1e
Added sourcesJar
rjrudin Jan 1, 2016
c33061f
Only needs jcenter now
rjrudin Jan 1, 2016
f10db5e
Adding rjrudin bintray back for now
rjrudin Jan 1, 2016
2bcc93d
Only needs jcenter now
rjrudin Jan 3, 2016
6163b7c
Changing logging from warn to info
rjrudin Jan 4, 2016
2936107
Now using 2.5 of ml-javaclient-util and ml-junit
rjrudin Jan 4, 2016
a6809fb
Only need jcenter
rjrudin Jan 5, 2016
3572c4e
#74 New command for verifying server version
rjrudin Jan 6, 2016
8c4a23e
Starting 2.0rc3 changelog
rjrudin Jan 6, 2016
fbc4c6e
#75 Finish mimetypes
rjrudin Jan 17, 2016
605e13e
Updated changelog
rjrudin Jan 17, 2016
9d9a747
#77 Now supports properties starting with "marklogic."
rjrudin Jan 18, 2016
732f71c
#78 Fixed issue with mlContentForestsPerHost not being supported
rjrudin Jan 19, 2016
aa7af90
Update README.md
rjrudin Jan 19, 2016
551ce51
Added test for deleting multiple "other" servers at once, and added e…
rjrudin Jan 20, 2016
f3c2d1b
Updating changelog for 2.0rc4
rjrudin Jan 20, 2016
e1988a2
Updated license
rjrudin Jan 31, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 101 additions & 4 deletions CHANGELOG.mdown
Original file line number Diff line number Diff line change
@@ -1,8 +1,60 @@
# ml-app-deployer releases
This changelog is in its infancy, but the plan is to start tracking all changes via issues and then associating them
with releases.

TODO Reconcile this with what's in gradle.properties
## 2.0rc4 - 2016-01-20

* Added exception handling for intermittent case where, when deleting multiple XDBC/ODBC servers in a row, the 2nd one will fail
* [#78](https://github.com/rjrudin/ml-app-deployer/issues/78) Added support for mlContentForestsPerHost
* [#77](https://github.com/rjrudin/ml-app-deployer/issues/77) Support Spring Boot-style properties with a "marklogic." prefix

## 2.0rc3 - 2016-01-17

* [#74](https://github.com/rjrudin/ml-app-deployer/issues/74) New command for verifying that MarkLogic version is at least 8
* [#75](https://github.com/rjrudin/ml-app-deployer/issues/75) Added mimetypes support

## 2.0rc2 - 2016-01-03

* Depends on 2.5 of ml-javaclient-util and ml-junit
* [#73](https://github.com/rjrudin/ml-app-deployer/issues/73) Added support for setting a FileFilter on AppConfig for controlling what assets are loaded

## 2.0rc1 - 2015-12-23

* Repackaging to com.marklogic

## 2.0b16

* Fixed issue with setting custom asset permissions; now just have appConfig.setModulePermissions via mlModulePermissions
* [#72](https://github.com/rjrudin/ml-app-deployer/issues/72) Now waits for a restart properly after deleting an app server (worked fine for REST API servers, but not ODBC/XDBC servers)

## 2.0b15

* New resource API
* Improved logging of commands, including directories/files being processed

## 2.0b14

* Added disableAll/enableAll methods to ConfigManager (flexrep)
* Added disable/enable methods to TargetManager (flexrep)
* Fixed bug with getAsXml(String resourceNameOrId) on ServerManager (it was omitting the required group-id param)
* Allowing for DocumentFormatGetter to be overridden on LoadModulesCommand

## 2.0b13

* Added SetSslFipsEnabledCommand
* [#67](https://github.com/rjrudin/ml-app-deployer/issues/67) Now supporting triggers (requires ML 8.0-4)
* [#68](https://github.com/rjrudin/ml-app-deployer/issues/68) Now supporting alert configs, actions, and rules (requires ML 8.0-4)
* Can delete all scheduled tasks with TaskManager
* Can delete all flexrep configs with ConfigManager
* Can delete all alert configs with AlertConfigManager

## 2.0b12

* Added null-check in SimpleAppDeployer
* Added convenience constructor to DeployDatabaseCommand to simplify creating a new command for a custom database

## 2.0b11

* [#62](https://github.com/rjrudin/ml-app-deployer/issues/62) Amps are now deployed after the modules database is created.
* [#61](https://github.com/rjrudin/ml-app-deployer/issues/61) Forest replicas can now be created as part of mlDeploy

## 2.0b10

Expand All @@ -13,4 +65,49 @@ and DeployTriggersDatabaseCommand and DeploySchemasDatabaseCommand now default t

* [#56](https://github.com/rjrudin/ml-app-deployer/issues/56) ConfigureForestReplicasCommand now supports "undo", using
new methods in ForestManager to delete replica forests. Also extracted AbstractUndoableCommand.
* [#57](https://github.com/rjrudin/ml-app-deployer/issues/57) Fixed creation of forests on multiple hosts
* [#57](https://github.com/rjrudin/ml-app-deployer/issues/57) Fixed creation of forests on multiple hosts


## Old CHANGELOG

## 2.0-alpha-1 First pending release of 2.0 version that depends on ML8 Mgmt API

## 2.0-alpha-3 Targeting Java 1.7

## 2.0-alpha-5 Security/CPF support, bumped up to 2.0.4 of ml-javaclient-util

## 2.0-alpha-6 AdminManager methods and custom token support

## 2.0-alpha-7 ConfigDir's baseDir is now modifiable; 2.0.6 of ml-javaclient-util; fixed CPF sort order issue

## 2.0a8 Load default CPF pipelines; scaffolding

## 2.0a9 Fix for waiting for ML to restart

## 2.0a10 SQL views support; CreateOtherServersCommand; CreateSchemasDatabaseCommand

## 2.0a11 All security resources now created as admin user

## 2.0a12 Loading modules now loads options/properties against the test server too (if it exists)

## 2.0a13 Dropping xdbcUsername/xdbcPassword from AppConfig

## 2.0a14 Dropping get*Xdbc methods from AppConfig

## 2.0a15 AbstractResourceCommand now sorts files

## 2.0b1 Repackaged, added GroupManager

## 2.0b2 Using ml-javaclient-util 2.2

## 2.0b3 Cert template IDs are stored in the custom tokens map

## 2.0b4 Added CreateDatabasesCommand; renamed Create prefix to Deploy in most cases

## 2.0b5 DeployGroups command will now wait for a restart if necessary; LoadModulesCommand now first loads all assets from all module paths; added GenerateTemporaryCertificateCommand

## 2.0b6 Added flexrep support - DeployConfigsCommand and DeployTargetsCommand

## 2.0b7 Depends on ml-javaclient-util 2.2.2, which supports a FileFilter for XccAssetLoader

## 2.0b8 Depends on ml-javaclient-util 2.3, which has a new interface for ModulesLoader; added ConfigureReplicaForestsCommand
209 changes: 10 additions & 199 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -1,202 +1,13 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
Copyright 2014-2016 MarkLogic Corporation

TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

1. Definitions.

"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.

"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.

"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.

"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.

"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.

"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.

"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).

"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.

"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."

"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.

2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.

3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.

4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:

(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and

(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and

(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and

(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.

You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.

5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.

6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.

7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.

8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.

9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.

END OF TERMS AND CONDITIONS

APPENDIX: How to apply the Apache License to your work.

To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.

Copyright {yyyy} {name of copyright owner}

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
12 changes: 8 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Under the hood, it depends on Spring's [RestTemplate](http://docs.spring.io/spri

The general pattern for using the management client library is:

1. Create an instance of [ManageConfig](https://github.com/rjrudin/ml-app-deployer/blob/master/src/main/java/com/rjrudin/marklogic/mgmt/ManageConfig.java), which specifies connection information for the management REST API instance.
2. Create an instance of [ManageClient](https://github.com/rjrudin/ml-app-deployer/blob/master/src/main/java/com/rjrudin/marklogic/mgmt/ManageClient.java) using ManageConfig. ManageClient simply wraps a RestTemplate with some convenience methods.
3. Using ManageClient, create a Manager class based on the management resource you want to configure. For example, to create or modify or delete a database, create a [DatabaseManager](https://github.com/rjrudin/ml-app-deployer/blob/master/src/main/java/com/rjrudin/marklogic/mgmt/databases/DatabaseManager.java) to talk to the [database endpoints](http://docs.marklogic.com/REST/management/databases).
1. Create an instance of [ManageConfig](https://github.com/rjrudin/ml-app-deployer/blob/master/src/main/java/com/marklogic/mgmt/ManageConfig.java), which specifies connection information for the management REST API instance.
2. Create an instance of [ManageClient](https://github.com/rjrudin/ml-app-deployer/blob/master/src/main/java/com/marklogic/mgmt/ManageClient.java) using ManageConfig. ManageClient simply wraps a RestTemplate with some convenience methods.
3. Using ManageClient, create a Manager class based on the management resource you want to configure. For example, to create or modify or delete a database, create a [DatabaseManager](https://github.com/rjrudin/ml-app-deployer/blob/master/src/main/java/com/marklogic/mgmt/databases/DatabaseManager.java) to talk to the [database endpoints](http://docs.marklogic.com/REST/management/databases).

Here's a brief example of what that looks like:

Expand Down Expand Up @@ -49,7 +49,7 @@ files in the ml-config directory structure:
ManageClient client = new ManageClient(); // defaults to localhost/8002/admin/admin
AdminManager manager = new AdminManager(); // used for restarting ML; defaults to localhost/8001/admin/admin
AppDeployer deployer = new SimpleAppDeployer(client, manager,
new CreateRestApiServersCommand(), new CreateUsersCommand());
new DeployRestApiServersCommand(), new DeployUsersCommand());

// AppConfig contains all configuration about the application being deployed
AppConfig config = new AppConfig();
Expand All @@ -63,3 +63,7 @@ files in the ml-config directory structure:

// Calls each command, giving each a chance to undo what it did before
deployer.undeploy(config);

## When will there be a 2.0 final of ml-app-deployer?

This will be created in conjunction with the release of MarkLogic 8.0-4, which includes support for triggers and alerts, along with a number of fixes.
Loading