-
Notifications
You must be signed in to change notification settings - Fork 91
Support remote app deploy #1355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
29 commits
Select commit
Hold shift + click to select a range
d0475b1
initial checkin for remote app deployment
jshum2479 be4a9a2
update deployment strategy for remote app deploy
jshum2479 addffa6
Fix command line args requirement if -remote is used.
jshum2479 d32cb33
refactor cla vaidation
jshum2479 54d719d
refactor method name
jshum2479 0114cc9
add validation for remote update domain
jshum2479 a6b3e03
Bug fix for model context does not have domain name and home when usi…
jshum2479 af0bd92
Merge branch 'main' into support-remote-app-deploy
jshum2479 bd1cf25
Merge branch 'main' into support-remote-app-deploy
jshum2479 13cb877
Merge branch 'main' into support-remote-app-deploy
jshum2479 7d29faa
update CLI options
jshum2479 9589d42
fix bug for calculating hash when remote is specified.
jshum2479 094aa4f
refactor applicaiton_deployer for sonar
jshum2479 68dccb1
Merge branch 'main' into support-remote-app-deploy
jshum2479 426312e
add resource for tests
jshum2479 416cb28
update integration test
jshum2479 b8d63a4
update unit test
jshum2479 5470789
refactor
jshum2479 51335d9
doc and comments update
jshum2479 296e154
Merge branch 'main' into support-remote-app-deploy
jshum2479 cef55b1
Fix code error
jshum2479 f59234b
update copyrights
jshum2479 6724fb7
update doc
jshum2479 1e6f69a
doc update
jshum2479 5ef8176
pull out doc changes for this PR
jshum2479 990d1d0
refactor based on PR comments
jshum2479 fe906fd
remove obsolete method
jshum2479 38f8a69
remove extra line
jshum2479 ed3cff2
remove spaces
jshum2479 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,6 +31,8 @@ | |
from wlsdeploy.util.exit_code import ExitCode | ||
from wlsdeploy.util.model import Model | ||
from wlsdeploy.util.weblogic_helper import WebLogicHelper | ||
from wlsdeploy.tool.validate.validator import Validator | ||
from oracle.weblogic.deploy.validate import ValidateException | ||
|
||
|
||
wlst_helper.wlst_functions = globals() | ||
|
@@ -44,12 +46,12 @@ | |
|
||
__required_arguments = [ | ||
CommandLineArgUtil.ORACLE_HOME_SWITCH, | ||
CommandLineArgUtil.DOMAIN_HOME_SWITCH, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same questions as for Deploy. For discoverDomain -remote, we still require the user to provide -domain_home to support tokenization. I would think we might need this for at least updateDomain -remote if not all remote operations. |
||
CommandLineArgUtil.MODEL_FILE_SWITCH | ||
] | ||
|
||
__optional_arguments = [ | ||
# Used by shell script to locate WLST | ||
CommandLineArgUtil.DOMAIN_HOME_SWITCH, | ||
CommandLineArgUtil.DOMAIN_TYPE_SWITCH, | ||
CommandLineArgUtil.ARCHIVE_FILE_SWITCH, | ||
CommandLineArgUtil.VARIABLE_FILE_SWITCH, | ||
|
@@ -66,6 +68,7 @@ | |
CommandLineArgUtil.OUTPUT_DIR_SWITCH, | ||
CommandLineArgUtil.UPDATE_RCU_SCHEMA_PASS_SWITCH, | ||
CommandLineArgUtil.DISCARD_CURRENT_EDIT_SWITCH, | ||
CommandLineArgUtil.REMOTE_SWITCH, | ||
CommandLineArgUtil.WAIT_FOR_EDIT_LOCK_SWITCH | ||
] | ||
|
||
|
@@ -85,6 +88,7 @@ def __process_args(args): | |
cla_helper.validate_optional_archive(_program_name, argument_map) | ||
cla_helper.validate_required_model(_program_name, argument_map) | ||
cla_helper.validate_variable_file_exists(_program_name, argument_map) | ||
cla_helper.validate_if_domain_home_required(_program_name, argument_map) | ||
|
||
__wlst_mode = cla_helper.process_online_args(argument_map) | ||
cla_helper.process_encryption_args(argument_map) | ||
|
@@ -130,14 +134,27 @@ def __update_online(model, model_context, aliases): | |
__logger.info("WLSDPLY-09005", admin_url, timeout, method_name=_method_name, class_name=_class_name) | ||
|
||
try: | ||
|
||
if model_context.is_remote(): | ||
model_validator = Validator(model_context, aliases, logger=__logger, wlst_mode=WlstModes.ONLINE) | ||
model_validator.validate_in_tool_mode(model.get_model(), None, | ||
model_context.get_archive_file_name()) | ||
|
||
__wlst_helper.connect(admin_user, admin_pwd, admin_url, timeout) | ||
|
||
# -remote does not have domain home set, so get it from online wlst after connect | ||
model_context.set_domain_home_name_if_remote(__wlst_helper.get_domain_home_online(), | ||
__wlst_helper.get_domain_name_online()) | ||
|
||
deployer_utils.ensure_no_uncommitted_changes_or_edit_sessions(skip_edit_session_check) | ||
__wlst_helper.edit() | ||
__logger.fine("WLSDPLY-09019", edit_lock_acquire_timeout, edit_lock_release_timeout, edit_lock_exclusive) | ||
__wlst_helper.start_edit(acquire_timeout=edit_lock_acquire_timeout, release_timeout=edit_lock_release_timeout, | ||
exclusive=edit_lock_exclusive) | ||
if model_context.is_discard_current_edit(): | ||
deployer_utils.discard_current_edit() | ||
except ValidateException, ve: | ||
raise ve | ||
except BundleAwareException, ex: | ||
raise ex | ||
|
||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there ever a case where the model for a remote deploy operation might have a domain home token? If so, what happens if the user did not provide the domain home path on the remote machine?