Skip to content

Develop switch kub #567

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

Open
wants to merge 54 commits into
base: develop
Choose a base branch
from
Open

Develop switch kub #567

wants to merge 54 commits into from

Conversation

farshad68
Copy link

run the HOBBIT on Kubernetes

@farshad68 farshad68 requested review from MichaelRoeder and denkv April 7, 2025 14:17
Copy link
Contributor

@MichaelRoeder MichaelRoeder left a comment

Choose a reason for hiding this comment

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

Great development! 🙂

  • Did you ensure that the platform still runs on Docker Swarm? Or will this option disappear over time?
  • Kubernetes file need documentation! What about a README.md in the kubernetes-yaml-files directory?
  • You should add yourself as @author to the classes that you implemented / changed

Also, please have a look at the other comments.

LOGGER.debug("Container observer initialized.");
}

private void dokcerswarmInit() throws Exception {
Copy link
Contributor

Choose a reason for hiding this comment

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

Typo in the method name. Please also use camel case, i.e., dockerSwarmInit

Copy link
Author

Choose a reason for hiding this comment

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

sure, I thought docker swarm was one word.

super.init();
LOGGER.debug("Platform controller initialization started.");

switch (System.getenv("RUN_ON").toLowerCase()){
Copy link
Contributor

Choose a reason for hiding this comment

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

  1. This is not the established way to access the environment in HOBBIT. Please use the configuration class that we established for that.
  2. Please ensure that the code is safe. In this case, there might be a null pointer because it is not guaranteed that getenv returns something.

kubernetsInit();
break;
default:
kubernetsInit();
Copy link
Contributor

Choose a reason for hiding this comment

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

Please also add a log message, since the user should be aware that the platform "guesses" were it is.

expManager.systemOrBenchmarkReady(true, sessionId);
break;
}
case Commands.TASK_GENERATION_FINISHED: {
LOGGER.debug("Task generator finish: {}", sessionId);
Copy link
Contributor

Choose a reason for hiding this comment

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

finished

// get containerId from params
StopCommandData stopParams = GsonUtils.deserializeObjectWithGson(gson, data, StopCommandData.class, false);
// trigger stop
stopContainer(stopParams.containerName);
break;
}
case Commands.BENCHMARK_READY_SIGNAL: {
LOGGER.debug("Ready signal: {}", sessionId);
Copy link
Contributor

Choose a reason for hiding this comment

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

"Benchmark Ready signal: {}"

@@ -26,6 +26,7 @@
import org.apache.jena.rdf.model.Model;
import org.apache.jena.vocabulary.RDF;
import org.hobbit.controller.ConnectivityAssumptionUtils;
import org.hobbit.controller.containers.GitlabBasedImageManager;
Copy link
Contributor

Choose a reason for hiding this comment

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

When the tested class moves into a different package, the test classes should move, too.

@@ -7,6 +7,8 @@
import org.apache.jena.sparql.vocabulary.DOAP;
import org.apache.jena.vocabulary.RDF;
import org.apache.jena.vocabulary.RDFS;
import org.hobbit.controller.containers.ResourceInformationCollector;
import org.hobbit.controller.containers.docker.ResourceInformationCollectorImpl;
Copy link
Contributor

Choose a reason for hiding this comment

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

When the tested class moves into a different package, the test classes should move, too.

@@ -21,12 +21,18 @@
import java.util.Collection;
import java.util.List;

import org.hobbit.controller.containers.docker.ContainerManagerImpl;
Copy link
Contributor

Choose a reason for hiding this comment

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

When the tested class moves into a different package, the test classes should move, too.

@farshad68
Copy link
Author

Great development! 🙂

  • Did you ensure that the platform still runs on Docker Swarm? Or will this option disappear over time?
  • Kubernetes file need documentation! What about a README.md in the kubernetes-yaml-files directory?
  • You should add yourself as @author to the classes that you implemented / changed

Also, please have a look at the other comments.

thanks :)
Actually, we don't change that part and try to keep the code backward compatible, then on paper it should, but I didn't test that on actually cluster .

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.

3 participants