The document Submarine Quickstart shows how to deploy the Submarine service to your Kubernetes cluster. The Submarine service consists mainly of nine components, and you can check them with the following command:
kubectl get pods -n ${your_namespace}
A brief introduction about these components:
Checkstyle plugin may help to detect violations directly from the IDE.
Preference
-> Plugins
Preference
-> Tools
-> Checkstyle
${SUBMARINE_HOME}/dev-support/maven-config/checkstyle.xml
Unit Test
For each class, there is a corresponding testClass. For example, SubmarineServerTest
is used for testing SubmarineServer
. Whenever you add a funtion in classes, you must write a unit test to test it.
Integration Test: IntegrationTestK8s.md
Before building
Package the Submarine server into a new jar file
mvn install -DskipTests
Build the new server docker image in minikube
# switch to minikube docker daemon to build image directly in minikube eval $(minikube docker-env) # run docker build ./dev-support/docker-images/submarine/build.sh # exit minikube docker daemon eval $(minikube docker-env -u)
Delete the server deployment and the operator will create a new one using the new image
kubectl delete deployment submarine-server
Deploy the Submarine
Follow Getting Started/Quickstart, and make sure you can connect to http://localhost:32080
in the browser.
Install the dependencies
cd submarine-workbench/workbench-web npm install
Run the workbench based on proxy server
npm run start
http://localhost:4200
will be redirected to http://localhost:32080
.http://localhost:4200
in browser to see the real-time change of workbench.Frontend E2E test: IntegrationTestE2E.md
Build the docker image
# switch to minikube docker daemon to build image directly in minikube eval $(minikube docker-env) # run docker build ./dev-support/docker-images/database/build.sh # exit minikube docker daemon eval $(minikube docker-env -u)
Deploy new pods in the cluster
helm upgrade --set submarine.database.dev=true submarine ./helm-charts/submarine
For details, please check out the README and Developer Guide on GitHub.
Submarine website is built using Docusaurus 2, a modern static website generator.
We store all the website content in markdown format in the submarine/website/docs
. When committing a new patch to the submarine
repo, Docusaurus will help us generate the html
and javascript
files and push them to https://github.com/apache/submarine-site/tree/asf-site.
To update the website, click “Edit this page” on the website.
If you want to add a new page to the website, make sure to add the file path to sidebars.js.
We use the yarn package manager to install all dependencies for the website
yarn install
Make sure you can successfully build the website before creating a pull request.
yarn build
This command starts a local development server and open up a browser window. Most changes are reflected live without having to restart the server.
yarn start