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

installation: add minikube installation #15

Merged
merged 1 commit into from
Apr 7, 2017

Conversation

diegodelemos
Copy link
Member

Signed-off-by: Diego Rodriguez diego.rodriguez@cern.ch


.. code-block:: console

$ MINIKUBE_IP=$(minikube ip)
Copy link
Member

Choose a reason for hiding this comment

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

Did you mean $ export MINIKUBE_ID=$(minikube ip)?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes... Thanks!

@diegodelemos diegodelemos force-pushed the 4-add-local-installation branch 5 times, most recently from 2427805 to ecb4b3b Compare March 23, 2017 23:14
Copy link
Contributor

@hjhsalo hjhsalo left a comment

Choose a reason for hiding this comment

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

I hope summary is OK even if I didn't use line comments.

I tested on Ubuntu 16.04 x64.
I didn't test the Kubernetes cluster creation on Openstack.

Fixes needed in docs/installation.rst:

  • There are hardcoded strings of "Installing minikube for OSX ..." and "Installing latest kubectl for OSX ...". There should be Linux alternatives for them.

  • There are two instances of typo CONTOLLER_PORT which should be CONTROLLER_PORT since instructions guide you to open "http://$MINIKUBE_IP:$WORKFLOW_CONTROLLER_PORT" which won't work.

  • open "http://$WORKFLOW_CONTROLLER_IP:$WORKFLOW_CONTROLLER_PORT" gave a 404 even with corrected port (port is not written at all because of the CONTOLLER_PORT typo). Despite this, the cluster might be running fine since both of the other test links worked.

Fixes needed in scripts/reana

  • Could't install because my Linux-system didn't pass the if ! "darwin linux" | grep -F -q -w -i "$(uname -s)" test and the script prompted that "Your OS is not supported." In order to proceed with the installation I had to comment out the test.

General notes:

  • Maybe it should be added that for now you should install with pip install -e .[all] before running reana install-minikube. It might not be clear for all who check out the repo on their own.

  • Also same thing that is said in Kubernetes cluster part about Python virtual environments, should probably be said in Minikube part as well: $ mkvirtualenv reana-resources-k8s

  • I had a non-blocking (cluster seemed to work fine) problem with ZeroMQ where $ kubectl get pods reported that zeromq-pod is not running: zeromq-msg-proxy-1617754619-qjvc7 0/1 CrashLoopBackOff 5 4m

  • Maybe it should be added that what you should expect when opening the links. Either text or small screenshots. E.g. for link "http://$JOB_CONTROLLER_IP:$JOB_CONTROLLER_PORT/jobs" theinstructions would say something like "Displays JSON with a key 'jobs' which is empty since no jobs are running on the minikube" and for link "http://$WORKFLOW_MONITOR_IP:$WORKFLOW_MONITOR_PORT/helloworld" that "Displays yadage-monitor".

@diegodelemos
Copy link
Member Author

There are hardcoded strings of "Installing minikube for OSX ..." and "Installing latest kubectl for OSX ...". There should be Linux alternatives for them.

Done

There are two instances of typo CONTOLLER_PORT which should be CONTROLLER_PORT since instructions guide you to open "http://$MINIKUBE_IP:$WORKFLOW_CONTROLLER_PORT" which won't work.

👍

open "http://$WORKFLOW_CONTROLLER_IP:$WORKFLOW_CONTROLLER_PORT" gave a 404 even with corrected port (port is not written at all because of the CONTOLLER_PORT typo). Despite this, the cluster might be running fine since both of the other test links worked.

This is foreseen because we just have a yadage endpoint which only accepts POST requests. I have opened a ticket and assigned you reanahub/reana-workflow-controller#20 it is quick change, just add an empty workflows endpoint!

Could't install because my Linux-system didn't pass the if ! "darwin linux" | grep -F -q -w -i "$(uname -s)" test and the script prompted that "Your OS is not supported." In order to proceed with the installation I had to comment out the test.

I might be wrong, but I think that this is not currently happening, there was an echo missing in the tests statement but not anymore.

Maybe it should be added that for now you should install with pip install -e .[all] before running reana install-minikube. It might not be clear for all who check out the repo on their own.

I am not sure about this lets chat IRL

Also same thing that is said in Kubernetes cluster part about Python virtual environments, should probably be said in Minikube part as well: $ mkvirtualenv reana-resources-k8s

Not sure about this neither - IRL

I had a non-blocking (cluster seemed to work fine) problem with ZeroMQ where $ kubectl get pods reported that zeromq-pod is not running: zeromq-msg-proxy-1617754619-qjvc7 0/1 CrashLoopBackOff 5 4m

Work in progress. I am fixing reanahub/reana-workflow-monitor#13

Maybe it should be added that what you should expect when opening the links. Either text or small screenshots. E.g. for link "http://$JOB_CONTROLLER_IP:$JOB_CONTROLLER_PORT/jobs" theinstructions would say something like "Displays JSON with a key 'jobs' which is empty since no jobs are running on the minikube" and for link "http://$WORKFLOW_MONITOR_IP:$WORKFLOW_MONITOR_PORT/helloworld" that "Displays yadage-monitor".

Totally agree, thanks for the idea 👍

p.s. next time could you please comment in line? it is a bit messy to go from the comment to the code back and forth! thanks 🤙

@hjhsalo
Copy link
Contributor

hjhsalo commented Mar 24, 2017

Sorry, these comments were unnecessary. I didn't notice that they are already in the instructions. 🤦‍♂️

  • Maybe it should be added that for now you should install with pip install -e .[all] before running reana install-minikube. It might not be clear for all who check out the repo on their own.
  • Also same thing that is said in Kubernetes cluster part about Python virtual environments, should probably be said in Minikube part as well: $ mkvirtualenv reana-resources-k8s

@diegodelemos diegodelemos force-pushed the 4-add-local-installation branch 2 times, most recently from 95a35c7 to ee74e44 Compare March 24, 2017 10:39
@hjhsalo
Copy link
Contributor

hjhsalo commented Mar 24, 2017

Note that I just added a PR21 to reana-workflow-controller that addresses comments about /workflows -endpoint.

{
"workflows": {}
}
$ open "http://$MINIKUBE_IP:$WORKFLOW_MONITOR_PORT/helloworld"
Copy link
Member

Choose a reason for hiding this comment

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

open ... is macOS specific. Something like xdg-open ... works on GNU/Linux. If it works on macOS too, then please switch. Otherwise let us simply use firefox ... as people will know what that means...


.. code-block:: console

$ export WORKFLOW_CONTROLLER_PORT=$(kubectl describe service workflow-controller | grep 'NodePort:' | cut -f 4 | sed -e "s@/TCP@@")
Copy link
Member

Choose a reason for hiding this comment

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

For these and other environment variables, it would be good to use the common prefix REANA_... so that we don't create a mess in people's environments...

.. code-block:: console

$ reana-resources-k8s build-manifests
$ kubectl create -Rf configuration-manifests
Copy link
Member

Choose a reason for hiding this comment

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

-rf should be enough, let's keep it lowercase.

Copy link
Member Author

Choose a reason for hiding this comment

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

For some reason kubectl uses only the capital r for the recursive option


.. code-block:: console

$ rm -Rf configuration-manifests
Copy link
Member

Choose a reason for hiding this comment

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

-rf

scripts/reana Outdated

# Deploy system
echo 'Deploying REANA on minikube ...'
kubectl create -Rf configuration-manifests
Copy link
Member

Choose a reason for hiding this comment

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

-rf


$ reana install-minikube

which will do the following:
Copy link
Member

Choose a reason for hiding this comment

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

It would be good to decouple the steps that install kubernetes/minikube itself, which many people would prefer to do outside of REANA using their packaging systems, and install the rest of the REANA component ecosystem.

The getting started overview for people would then look like:

$ pip install reana
$ reana install-backend minikube # or skip this step if you have it already
$ reana configure-backend minikube # or other clouds later... just an example
$ reana configure-container docker # or singularity... just an example
$ reana pull-components 
$ reana build-manifests
$ reana initialise-backend
$ reana run-hello-world
...

(hypothetical example, let's muse IRL)

@diegodelemos diegodelemos self-assigned this Apr 3, 2017
scripts/reana Outdated
case $1 in
install-minikube ) install_local_minikube
;;
clean-minikube) minikube delete
Copy link
Contributor

Choose a reason for hiding this comment

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

I couldn't get minikube cluster to start after the first run without running minikube delete first.
I'm not sure how many times I started it before using reana install-minikube or did I mess around with Virtualbox, but I would bet that some of the minikube VM's were either in corrupted state or not present.
Maybe something about running reana clean-minikube should be added to the documentation? Maybe just a side note:

"NOTE: In case you run into error messages from Kubernetes related to local Kubernetes cluster (aka minikube), you can try to run reana clean-minikube to delete VMs created by previous minikube installation / initialization"

BTW, the error I got was:

Starting local Kubernetes cluster...
Starting VM...
E0403 20:06:00.759374   16086 start.go:113] Error starting host: Error getting state for host: machine does not exist.

Copy link
Member Author

Choose a reason for hiding this comment

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

Since our discussion last week, we decided to leave backend specific management up to the user. Just a minimal command for installing and running Kubernetes is provided. However, if it doesn't work (he have to investigate your problem to see if it is easy to fix) I would suggest to remove it from the CLI and stick to REANA specific operations.

* Adds local installation documentation and amends OpenStack
  installation. (closes reanahub#4)

* Adds `minikube` specific installation option to REANA configuration
  script. (addresses reanahub#13)

Signed-off-by: Diego Rodriguez <diego.rodriguez@cern.ch>
@diegodelemos
Copy link
Member Author

As I specify in the code, it is not ready for non local installation (it is somehow, but hacks such as changing reana-resources-k8s configuration file by hand is needed 🙅 ) but since we are addressing #13, local development and quick tests by early adopters, we can leave it for later.

Specially in this case, differing from local to production could be easily specified by running pip install reana[minikube] or pip install reana[kubernetes] so a Python CLI (click) would be easier to implement (as discussed IRL with @tiborsimko ). On the other hand, I am not sure if now is the best moment to address it, probably using sh CLI for now and focusing in other work packages would be more useful. OFC we have to discuss IRL on Friday

@tiborsimko
Copy link
Member

Thanks, let's merge now and let's improve CLI language and docs later.

@tiborsimko tiborsimko merged commit 3f0d713 into reanahub:master Apr 7, 2017
@diegodelemos diegodelemos deleted the 4-add-local-installation branch April 10, 2020 13:43
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