IBM/FfDL

Setup more complicated than 3 steps in README

Closed this issue · 2 comments

fplk commented

Documented commands do not show all how to setup FfDL from scratch

I noticed that setting up FfDL on macOS is more involved than the steps in the documentation - steps like make minikube, eval $(minikube docker-env) or make docker-build-base are omitted and it would also help to have instructions on how to install dependencies. In general, the following instructions should work:

# Install Docker
# Approximately https://docs.docker.com/docker-for-mac/install/

# Install Go
brew install go
brew install glide  # Alternative: curl https://glide.sh/get | sh
export GOPATH=$HOME/go
echo "export GOPATH=$HOME/go" >> ~/.profile
export PATH=${GOPATH}/bin:$PATH
echo "export PATH=\$GOPATH/bin:\$PATH" >> ~/.profile
source ~/.profile

# Install Minikube
brew cask install virtualbox  # or use installer from https://www.virtualbox.org/wiki/Downloads
brew cask install minikube
brew install kubernetes-helm

# Hyperkit
curl -LO https://storage.googleapis.com/minikube/releases/latest/docker-machine-driver-hyperkit \
&& chmod +x docker-machine-driver-hyperkit \
&& sudo mv docker-machine-driver-hyperkit /usr/local/bin/ \
&& sudo chown root:wheel /usr/local/bin/docker-machine-driver-hyperkit \
&& sudo chmod u+s /usr/local/bin/docker-machine-driver-hyperkit
# Potential Alternative:
# brew install --build-from-source hyperkit

# Clone FfDL
mkdir -p $GOPATH/src/github.com/IBM && cd $_
git clone https://github.com/IBM/FfDL.git && cd FfDL

# Build FfDL
export VM_TYPE=minikube
# Modify Makefile and change MINIKUBE_DRIVER from xhyve to hyperkit
sed -i '' -e "s/MINIKUBE_DRIVER ?= xhyve/MINIKUBE_DRIVER ?= hyperkit/g" Makefile
glide install
make build
make minikube
eval $(minikube docker-env)
make docker-build-base
make docker-build
make deploy

With two minor things to add...

  • Probably need to install helm and kubectl as well
  • Need to add instructions to install Docker

...and three questions:

  • Would you like me to do this and submit a PR?
  • Which document should this go into? docs/setup-guide.md?
  • Do we want to add a fully automatic script like we provide for DIND with the new PR? What does the end game look like regarding setup? Will we try to build one master installation script set for all platforms, one set for each platform or do we ultimately want to push the entire setup into tools like Ansible or helm?

Thanks in advance.

PS regarding troubleshooting:
We should also consider adding a docs/troubleshooting.md.
For instance, I have seen the following issues on Minikube:

  • If make deploy dies after "Initializing..." most likely VM_TYPE=minikube was not set.
  • If make deploy gets stuck at "Installing helm/tiller..." most likely helm is not installed.
    Does that make sense? Do you want me to seed a troubleshooting file as well? Can you think of additional common errors?

I think we mentioned some of the requirements (like helm and docker) in the prerequisites, but having a setup-guide would definitely help.

For the fully automatic script, I don't think is necessary because we need to maintain it and it's mostly about how to setup the Kubernetes cluster on local machine. But we should point them to some Kubernetes documentations for setting up Kubernetes Cluster other than Minikube.

fplk commented

Moved to architecture repo. Will create PR in near future with setup instructions and troubleshooting.