Skip to content
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

INFRA-427: Add a new deployment type to accommodate the new Ozone packaging #42

Merged
merged 8 commits into from
Jan 25, 2024

Conversation

enyachoke
Copy link
Collaborator

This PR handles changes needed for https://mekomsolutions.atlassian.net/browse/INFRA-427 and https://mekomsolutions.atlassian.net/browse/INFRA-428. I still need to investigate an Issue with a failing test but we can start reviewing the code. The name of the project type is not final so suggestions are welcome.

@rbuisson
Copy link
Member

Thanks @enyachoke for this good piece of work.

With this new deployment type, are we allowed to provide anything as Maven artifact anymore? Or has this been deprecated?

@enyachoke
Copy link
Collaborator Author

enyachoke commented Jan 12, 2024

Thanks @enyachoke for this good piece of work.

With this new deployment type, are we allowed to provide anything as Maven artifact anymore? Or has this been deprecated?

You can still provide a Maven artifact. I will add a spec to validate that

Copy link
Member

@rbuisson rbuisson left a comment

Choose a reason for hiding this comment

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

Sorry, I've had started to review and got interrupted.
Let me publish what I had commented.

@@ -112,7 +112,7 @@ module.exports = {
} else if (deployment.hostDir === "") {
throw new Error("The 'host dir' is not specified.");
}

console.log(JSON.stringify(deployment));
Copy link
Member

Choose a reason for hiding this comment

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

Should be removed.

Comment on lines 85 to 96
// expected += scripts.rsync(
// { ...instanceDef.deployment.host.value, ...{ remoteDst: true } },
// config.getCDDockerDirPath(instanceDef.uuid),
// path.resolve(
// instanceDef.deployment.hostDir,
// instanceDef.name,
// "docker_compose"
// ),
// true,
// null,
// "-avzz --delete"
// );
Copy link
Member

Choose a reason for hiding this comment

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

What should we do with this? Not applicable anymore with this new deployment type?

@@ -11,25 +11,35 @@ const heredoc_3 = cst.HEREDOC_3;
const utils = require("../utils/utils");
const model = require("../utils/model");
const createEnvVarFile = function(instanceDef, dockerComposePath) {
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this function should be Docker specific, right?
Please rename to something more generic.

dockerComposeFiles: ["docker-compose.yml", "docker-compose-2.yml"],
envFiles: ["env-file-1", "env-file-2"],
value: {
mavenProject: {
Copy link
Member

Choose a reason for hiding this comment

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

Let's remove support for mavenProject as part of this new type.

Copy link
Member

Choose a reason for hiding this comment

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

Please rename the file, if it's still needed, dockerComposeGenericLegacy.spec.js

group: "tlc",
deployment: {
hostDir: "/var/docker-volumes/",
workDir: "/var/docker-volumes/artifacts/run/docker",
Copy link
Member

Choose a reason for hiding this comment

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

Let's move this key to value and rename it to projectPath

@@ -382,7 +382,8 @@ module.exports = {
"dockerCompose",
"dockerComposeGit",
"dockerComposeMaven",
"dockerComposeGenericMaven"
"dockerComposeGenericMaven",
"dockerComposeProjectDir"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Rename to dockerComposeFromArtifact.

Copy link
Member

@rbuisson rbuisson left a comment

Choose a reason for hiding this comment

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

It seems that you've dropped this addition:

A type which assumes that the Docker Compose project will be installed through the processing of the artifacts section.

Copy link
Member

@rbuisson rbuisson left a comment

Choose a reason for hiding this comment

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

Tried it and works good.

)
) {
throw new Error(
"The Docker compose deployment value should be provided as an instance of 'DockerComposeFromArtifactDeployment'."
Copy link
Member

Choose a reason for hiding this comment

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

Could you replace by:

The 'DockerComposeFromArtifact' deployment value should be provided as an instance of...

@enyachoke enyachoke merged commit e5534ca into mekomsolutions:master Jan 25, 2024
1 check passed
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.

2 participants