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

Use any commit or version of Dataverse in container and Kubernetes #64

Closed
poikilotherm opened this issue Jun 2, 2019 · 3 comments · Fixed by #87
Closed

Use any commit or version of Dataverse in container and Kubernetes #64

poikilotherm opened this issue Jun 2, 2019 · 3 comments · Fixed by #87
Labels
enhancement New feature or request
Milestone

Comments

@poikilotherm
Copy link
Member

poikilotherm commented Jun 2, 2019

Currently, the upstream project does not contain up-to-date Docker images nor does IQSS provide officiall support these installation adventures (which is why this project came to live in the first place).

With the current rise of attention for salvation of IQSS/dataverse#4172, a demand to try things on K8s is rising, too. In addendum, it should be possible to develop, run and test any commit or code change on containers (enhanced by K8s), locally or within CI.

A current solution to this is usage of IQSS/dataverse-ansible in combination with ec2-create-instance.sh. This is fine, but requires an Amazon EC2 account and payment. Also, DataverseEU is going to run things on K8s and the word goes it might be a bad idea to have too much differences between development and production (coming from the principles of CD), especially when talking about technology stack.

Thus, a workflow is needed, which preferably is adaptable to different scenarios and use cases.
To all readers: any feedback is welcome on this. Please join the discussion.
Pinging @pdurbin, @4tikhonov, @donsizemore, @pameyer here.

@poikilotherm
Copy link
Member Author

poikilotherm commented Jun 2, 2019

Let me post a first idea about a possible workflow.

First, let us make some assumptions for this:

  1. People interested in developing things on K8s most certainly will be ok with installing a tool or two.
  2. As far as I understood it, interest in running Dataverse on K8s is relatively low at IQSS. Thus I will try to keep upstream code as much as possible out of this for now - the less code changes the better. (There will be more than enough for getting things like Config API in place...)
  3. People don't like waiting. Try to cache as much as possible.
  4. Anybody hacking on Dataverse will want to build and execute unit tests locally. It should be safe to assume Maven is installed.

A possible flow:

  1. git clone dataverse-kubernetes
  2. git submodule update --init will download upstream code in a subfolder.
    This submodule can be versioned in the branch of the kubernetes project. It can point to any fork of upstream, etc. Thus people can develop in their forks/branches and follow their guidelines. Obviously, using submodules has its pitfalls. Everything comes at a price. See also this simple reference
  3. skaffold dev triggers the build and more (see https://skaffold.dev):
    1. Build source code in multistage (so keep Maven and Java version in sync with app server container)
    2. Build application image with build artifacts
    3. Test with container-structure-test
    4. Tag with commit id or branch. Maybe overrideable via variable?
    5. Push to registry
    6. Deploy to K8s
    7. Watch for changes :-)

poikilotherm added a commit that referenced this issue Jun 2, 2019
Using Maven in a container to build Dataverse from submodule
folder. Packaging in second step to application container
together with necessary files for bootstrapping, etc, also coming
from local submodule folder. (Mimicking the installer creation
of upstream...)
@poikilotherm
Copy link
Member Author

I just pushed commits with initial groundwork on this.
When you are feeling lucky, you should already have a usable image building manually.
Checkout the branch and do a docker build -t iqss/dataverse-k8s:4.14-test -f docker/dataverse-k8s/dev-payara/Dockerfile . from the source folder of this project. The initial build will take about 4 minutes. Succeding builds should be MUCH faster due to caching in Docker layers 😄

@poikilotherm
Copy link
Member Author

poikilotherm added a commit that referenced this issue Sep 13, 2019
…g arbitrary branches of Dataverse inside a container. Relates to #64.
poikilotherm added a commit that referenced this issue Sep 13, 2019
…g arbitrary branches of Dataverse inside a container. Relates to #64.
poikilotherm added a commit that referenced this issue Sep 13, 2019
…g arbitrary branches of Dataverse inside a container. Relates to #64.
poikilotherm added a commit that referenced this issue Sep 13, 2019
@poikilotherm poikilotherm added this to the v4.16 milestone Sep 19, 2019
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Nov 16, 2023
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Nov 16, 2023
…g arbitrary branches of Dataverse inside a container. Relates to gdcc#64.
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Nov 16, 2023
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Apr 25, 2024
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Apr 25, 2024
…g arbitrary branches of Dataverse inside a container. Relates to gdcc#64.
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Apr 25, 2024
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Apr 25, 2024
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Apr 25, 2024
…g arbitrary branches of Dataverse inside a container. Relates to gdcc#64.
T-Haeussermann pushed a commit to HyperSpec-FDM/dataverse-kubernetes that referenced this issue Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant