Skip to content

[#156] splitting azure into non-wildfly and wildfly module#168

Merged
istraka merged 2 commits into
wildfly-extras:mainfrom
istraka:issue_#156
Mar 29, 2023
Merged

[#156] splitting azure into non-wildfly and wildfly module#168
istraka merged 2 commits into
wildfly-extras:mainfrom
istraka:issue_#156

Conversation

@istraka

@istraka istraka commented Mar 23, 2023

Copy link
Copy Markdown
Collaborator

For #156

@mchoma @rsvoboda

Key changes:

  • azure module split into azure and azure-wildfly. The latter one is extending the first one bringing additional support for injecting OnlineManagementClient and deploying Archive (this operation is product specific).
  • core module split into core and core-wildfly. The later one brings WildFly specific annotations and dependencies (creaper , ...)
  • Injecting and deploying services (SPI) redesigned.
  • AWS is out of scope right now (temporarily removed from pom).

Examples:

Comment thread core/src/main/java/sunstone/core/AbstractSunstoneCloudDeployer.java Fixed
Comment thread core/src/main/java/sunstone/core/SunstoneExtension.java Fixed
Comment thread core/src/main/java/sunstone/core/SunstoneExtension.java Fixed
Comment thread core-wildfly/src/main/java/sunstone/core/CreaperUtils.java Fixed
Comment thread core-wildfly/src/main/java/sunstone/core/CreaperUtils.java Fixed
byte[] digest = sha256.digest();
return BaseEncoding.base16().encode(digest);
protected static String sum(String str) throws NoSuchAlgorithmException, UnsupportedEncodingException {
MessageDigest digest = MessageDigest.getInstance("SHA-3");

Check failure

Code scanning / CodeQL

Use of a potentially broken or risky cryptographic algorithm

Cryptographic algorithm [SHA-3](1) may not be secure, consider using a different algorithm.
Comment thread core/src/main/java/sunstone/core/api/SunstoneArchiveDeployer.java Outdated
static OnlineManagementClient staticMngmtClient;

@AzureVirtualMachine(name = AzureTestConstants.instanceName, group = SunstoneResourceAzSuiteTests.group, mode = OperatingMode.STANDALONE, standalone = @StandaloneMode(user = AzureTestConstants.mngmtUser, password = AzureTestConstants.mngmtPassword, port = AzureTestConstants.mngmtPort))
@AzureVirtualMachine(name = AzureTestConstants.instanceName, group = AzStandaloneManagementClientTests.group)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One can even say, having it separated like this is even cleaner/nicer. Btw. haven't we discussed this option in past?

But we can see (in this MR) it comes with bigger complexity/work. Now question is if it is worth in long term.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

We might have:)

Yeah, te project is more complex. Modules kinda extending other modules and depending on them, not really something that is widely used. However, the vision is to enable cross team collaboration. How much does it worth it is yet to be determined.

import java.util.Optional;


public class AzureArchiveDeployerProvider implements SunstoneArchiveDeployerProvider {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Just idea. Isn't product agnostic way of deployment copying war/jar "somewhere" on azure. I saw sunstone is already dealing with ftp in some cases. Can't that be used?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

It depends on the resource. On VMs, there is no universal way. On App Services, partially yes, you can specify a gith repository. On the other hand appservice.deploy() (from Azure SDK) supports only WAR archive type for EAP stack and not JAR, nor EAR.

@rsvoboda rsvoboda left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I have no objections to the changes, some polish needs to be done - comments by Martin.

I welcome the split as it helps to keep the abstraction on reasonable level and prevents to close bonding. And it keeps the doors open for addition of new runtimes.

@istraka

istraka commented Mar 29, 2023

Copy link
Copy Markdown
Collaborator Author

Merging...

@istraka istraka merged commit 76b4560 into wildfly-extras:main Mar 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants