From 3e150667a91b7c40b7b5f141cecee33aff48d599 Mon Sep 17 00:00:00 2001 From: Nikhil Rayaprolu Date: Thu, 13 Jul 2017 00:12:40 +0530 Subject: [PATCH] basic initialisation of all files Update installation_docker.md Update installation_ibm_bluemix_kubernetes.md Update installation_aws.md Update installation_google_cloud_kubernetes.md Update installation_digitalocean.md Update installation_docker.md Update installation_digitalocean.md Update installation_aws.md Update installation_digitalocean.md Update installation_google_cloud_kubernetes.md Update installation_ibm_bluemix_kubernetes.md Addresses #2 installation docs for cloud providers Update installation_ibm_bluemix_kubernetes.md Update installation_ibm_bluemix_kubernetes.md Update installation_google_cloud_kubernetes.md Update README.md final change --- README.md | 7 ++ docs/installation_aws.md | 55 +++++++++++ docs/installation_aws_docker.md | 55 +++++++++++ docs/installation_digitalocean.md | 47 ++++++++++ docs/installation_digitalocean_docker.md | 47 ++++++++++ docs/installation_docker.md | 43 +++++++++ docs/installation_google_cloud_docker.md | 47 ++++++++++ docs/installation_google_cloud_kubernetes.md | 87 ++++++++++++++++++ docs/installation_heroku.md | 0 docs/installation_ibm_bluemix_docker.md | 68 ++++++++++++++ docs/installation_ibm_bluemix_kubernetes.md | 96 ++++++++++++++++++++ 11 files changed, 552 insertions(+) create mode 100644 docs/installation_aws.md create mode 100644 docs/installation_aws_docker.md create mode 100644 docs/installation_digitalocean.md create mode 100644 docs/installation_digitalocean_docker.md create mode 100644 docs/installation_docker.md create mode 100644 docs/installation_google_cloud_docker.md create mode 100644 docs/installation_google_cloud_kubernetes.md create mode 100644 docs/installation_heroku.md create mode 100644 docs/installation_ibm_bluemix_docker.md create mode 100644 docs/installation_ibm_bluemix_kubernetes.md diff --git a/README.md b/README.md index b73a938..acdefef 100644 --- a/README.md +++ b/README.md @@ -213,6 +213,13 @@ If you did not start a ftp server, you can find the file in data/mcp-8100/assets The MCP organises the connection to the remote RabbitMQ server and a ftp server, but if another Grid Service is started, the MCP tells that service to handle the connection to the RabbitMQ and ftp server itself. The MCP can act as such an external service: just start another MCP and it will run at port 8101. Repeat the curl commands as given in the example above, but now use port 8101 to access the MCP. You will see that the second MCP learns from the first MCP to handle the connection by itself. +### How do I install loklak with Docker? +To install loklak with Docker please refer to the [yacy Docker installation readme](/docs/installation_docker.md). + +### How do I deploy loklak on Cloud Providers? +To install loklak on Cloud Providers please look documentations at [loklak Cloud installation readme](/docs/). + + ## Contribute This is a community project and your contribution is welcome! diff --git a/docs/installation_aws.md b/docs/installation_aws.md new file mode 100644 index 0000000..ab86698 --- /dev/null +++ b/docs/installation_aws.md @@ -0,0 +1,55 @@ +## Installing Yacy on AWS with Docker + +1. Sign in to [AWS](https://aws.amazon.com) + +2. In the top-right corner, choose a area you want to set up the instance, e.g.: Asia Pacific (Singapore). + +3. In the console panel, choose EC2. In EC2 Control Panel, choose key pairs, under Network & Security, and create a new key pair. It will automatically download the private key, and you should do ```chmod 400 YOUR_KEY_NAME``` to prevent other user to access your private key. After that, go back to your dashboard, and click Launch Instance. + +4. In Step 1: Choose an Amazon Machine Image, we choose ```Ubuntu Server 14.04 LTS (HVM), SSD Volume Type```. + +5. In Step 2: Choose an Instance Type, we choose ```t2.micro```(Warning: ```t2.micro``` is not suitable for running Yacy for a long period, and AWS may shut down your instance(block your Internet access on specific port) at any time. ```t2.micro``` instance users are only allow to use 10% of a single CPU core on average. In our case, Yacy_server uses 30 - 40% on average. Reference: [Burstable Instance](http://aws.amazon.com/ec2/faqs/#burst) Case study: [Real case running Yacy](http://geekinguniverse.com/2016/01/14/dont-use-aws-for-your-web-application/)) + +6. Then we click ```Configure Instance Details```, do not create a instance yet. + +7. Under ```Auto-assign Public IP```, we choose ```Enable``` + +8. Then we click ```Next: Add Storage``` + +9. We modify the storage to ```30GiB``` instead of default ```8Gib``` + +10. Click ```Next``` twice to go to ```Step 6: Configure Security Group```. Under this, we choose ```All TCP``` for type and ```Anywhere``` for source. + +11. We are ready to launch, click ```Review and Launch```, if everything is correct, click ```Launch```. It will ask you to choose a key pair, choose the one we just created. + +12. We go back to EC2 control panel again. Click on instances on the left hand side. Then choose the instance you just created, and click connect button on top. It will you connect to your EC2 by giving you a example like: + ``` + ssh -i "yacy.pem" ubuntu@ec2-54-169-103-75.ap-southeast-1.compute.amazonaws.com + ``` + +13. Once connected, we have to set up docker and add a 4G swapfile to prevent lack of memory: + ``` + sudo apt-get update + sudo apt-get -y upgrade + sudo fallocate -l 4G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + sudo apt-get install linux-image-extra-`uname -r` + sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D + echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list + sudo apt-get update + sudo apt-get install docker-engine + ``` + Or, to install docker on newer versions of ubuntu (other distros are not tested) we can just do: + ``` + sudo apt-get install docker.io + ``` + +14. Once docker is installed, we start our Yacy-server by entering: + ``` + sudo docker pull nikhilrayaprolu/yacy_grid_mcp + sudo docker run -d -p 8100:8100 -p 443:443 nikhilrayaprolu/yacy_grid_mcp:latest + ``` + +15. Check if Yacy is running on your server, by going to your public DNS, e.g.: ```ec2-54-169-103-75.ap-southeast-1.compute.amazonaws.com```. diff --git a/docs/installation_aws_docker.md b/docs/installation_aws_docker.md new file mode 100644 index 0000000..ab86698 --- /dev/null +++ b/docs/installation_aws_docker.md @@ -0,0 +1,55 @@ +## Installing Yacy on AWS with Docker + +1. Sign in to [AWS](https://aws.amazon.com) + +2. In the top-right corner, choose a area you want to set up the instance, e.g.: Asia Pacific (Singapore). + +3. In the console panel, choose EC2. In EC2 Control Panel, choose key pairs, under Network & Security, and create a new key pair. It will automatically download the private key, and you should do ```chmod 400 YOUR_KEY_NAME``` to prevent other user to access your private key. After that, go back to your dashboard, and click Launch Instance. + +4. In Step 1: Choose an Amazon Machine Image, we choose ```Ubuntu Server 14.04 LTS (HVM), SSD Volume Type```. + +5. In Step 2: Choose an Instance Type, we choose ```t2.micro```(Warning: ```t2.micro``` is not suitable for running Yacy for a long period, and AWS may shut down your instance(block your Internet access on specific port) at any time. ```t2.micro``` instance users are only allow to use 10% of a single CPU core on average. In our case, Yacy_server uses 30 - 40% on average. Reference: [Burstable Instance](http://aws.amazon.com/ec2/faqs/#burst) Case study: [Real case running Yacy](http://geekinguniverse.com/2016/01/14/dont-use-aws-for-your-web-application/)) + +6. Then we click ```Configure Instance Details```, do not create a instance yet. + +7. Under ```Auto-assign Public IP```, we choose ```Enable``` + +8. Then we click ```Next: Add Storage``` + +9. We modify the storage to ```30GiB``` instead of default ```8Gib``` + +10. Click ```Next``` twice to go to ```Step 6: Configure Security Group```. Under this, we choose ```All TCP``` for type and ```Anywhere``` for source. + +11. We are ready to launch, click ```Review and Launch```, if everything is correct, click ```Launch```. It will ask you to choose a key pair, choose the one we just created. + +12. We go back to EC2 control panel again. Click on instances on the left hand side. Then choose the instance you just created, and click connect button on top. It will you connect to your EC2 by giving you a example like: + ``` + ssh -i "yacy.pem" ubuntu@ec2-54-169-103-75.ap-southeast-1.compute.amazonaws.com + ``` + +13. Once connected, we have to set up docker and add a 4G swapfile to prevent lack of memory: + ``` + sudo apt-get update + sudo apt-get -y upgrade + sudo fallocate -l 4G /swapfile + sudo chmod 600 /swapfile + sudo mkswap /swapfile + sudo swapon /swapfile + sudo apt-get install linux-image-extra-`uname -r` + sudo apt-key adv --keyserver hkp://pgp.mit.edu:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D + echo "deb https://apt.dockerproject.org/repo ubuntu-trusty main" | sudo tee /etc/apt/sources.list.d/docker.list + sudo apt-get update + sudo apt-get install docker-engine + ``` + Or, to install docker on newer versions of ubuntu (other distros are not tested) we can just do: + ``` + sudo apt-get install docker.io + ``` + +14. Once docker is installed, we start our Yacy-server by entering: + ``` + sudo docker pull nikhilrayaprolu/yacy_grid_mcp + sudo docker run -d -p 8100:8100 -p 443:443 nikhilrayaprolu/yacy_grid_mcp:latest + ``` + +15. Check if Yacy is running on your server, by going to your public DNS, e.g.: ```ec2-54-169-103-75.ap-southeast-1.compute.amazonaws.com```. diff --git a/docs/installation_digitalocean.md b/docs/installation_digitalocean.md new file mode 100644 index 0000000..7605905 --- /dev/null +++ b/docs/installation_digitalocean.md @@ -0,0 +1,47 @@ +## Installing Yacy on DigitalOcean with Docker + +[DigitalOcean](https://www.digitalocean.com) - simple cloud hosting, built for developers. + +1. Register in [DigitalOcean](https://www.digitalocean.com) and get 10$ credit. + +2. Click 'Create droplet' button, choose your droplet image (Docker), size, location and add your SSH keys. + + ![Droplet image](http://i.imgur.com/wXXvg7W.png) + + ![SSH keys](http://i.imgur.com/egW1HsV.png) + +3. Click 'Create', wait a minute, copy ip of your new droplet and login to it using SSH: + ```bash + ssh root@YOUR.DROPLET.IP + ``` + +4. Docker is already installed, you can check it using ```docker version``` command. You should see something like this: + ``` + root@sevazhidkov:~# docker version + Client: + Version: 1.9.1 + API version: 1.21 + Go version: go1.4.2 + Git commit: a34a1d5 + Built: Fri Nov 20 13:12:04 UTC 2015 + OS/Arch: linux/amd64 + + Server: + Version: 1.9.1 + API version: 1.21 + Go version: go1.4.2 + Git commit: a34a1d5 + Built: Fri Nov 20 13:12:04 UTC 2015 + OS/Arch: linux/amd64 + ``` +5. Pull Docker image from [Yacy repository](https://hub.docker.com/r/nikhilrayaprolu/yacy_grid_mcp/) in Docker Hub (it should take about a minute): + ```bash + docker pull nikhilrayaprolu/yacy_grid_mcp + ``` + +6. OK, you're ready to run yacy: + ```bash + docker run -d -p 8100:8100 -p 443:443 nikhilrayaprolu/yacy_grid_mcp:latest + ``` + +7. Go to your droplet IP using web browser. You should see yacy main page. diff --git a/docs/installation_digitalocean_docker.md b/docs/installation_digitalocean_docker.md new file mode 100644 index 0000000..7605905 --- /dev/null +++ b/docs/installation_digitalocean_docker.md @@ -0,0 +1,47 @@ +## Installing Yacy on DigitalOcean with Docker + +[DigitalOcean](https://www.digitalocean.com) - simple cloud hosting, built for developers. + +1. Register in [DigitalOcean](https://www.digitalocean.com) and get 10$ credit. + +2. Click 'Create droplet' button, choose your droplet image (Docker), size, location and add your SSH keys. + + ![Droplet image](http://i.imgur.com/wXXvg7W.png) + + ![SSH keys](http://i.imgur.com/egW1HsV.png) + +3. Click 'Create', wait a minute, copy ip of your new droplet and login to it using SSH: + ```bash + ssh root@YOUR.DROPLET.IP + ``` + +4. Docker is already installed, you can check it using ```docker version``` command. You should see something like this: + ``` + root@sevazhidkov:~# docker version + Client: + Version: 1.9.1 + API version: 1.21 + Go version: go1.4.2 + Git commit: a34a1d5 + Built: Fri Nov 20 13:12:04 UTC 2015 + OS/Arch: linux/amd64 + + Server: + Version: 1.9.1 + API version: 1.21 + Go version: go1.4.2 + Git commit: a34a1d5 + Built: Fri Nov 20 13:12:04 UTC 2015 + OS/Arch: linux/amd64 + ``` +5. Pull Docker image from [Yacy repository](https://hub.docker.com/r/nikhilrayaprolu/yacy_grid_mcp/) in Docker Hub (it should take about a minute): + ```bash + docker pull nikhilrayaprolu/yacy_grid_mcp + ``` + +6. OK, you're ready to run yacy: + ```bash + docker run -d -p 8100:8100 -p 443:443 nikhilrayaprolu/yacy_grid_mcp:latest + ``` + +7. Go to your droplet IP using web browser. You should see yacy main page. diff --git a/docs/installation_docker.md b/docs/installation_docker.md new file mode 100644 index 0000000..4d90999 --- /dev/null +++ b/docs/installation_docker.md @@ -0,0 +1,43 @@ +# Installation of Yacy with Docker + +Docker is a way to move applications including the operating system to servers. + +## Get a Docker image + +Each of the following sections depend on a docker image with a Yacy server inside. +This section shows you how to get such an image. +Some possibilities may be used in the sections but you can may be able to exchange them. + +#### Pull a docker image +Pull a docker image from [dockerhub](https://hub.docker.com/r/nikhilrayaprolu/yacy_grid_mcp/). + +Type this command in your terminal: + ``` + docker pull nikhilrayaprolu/yacy_grid_mcp + ``` + +#### Build a docker image on your local machine + +1. Type the following commands in terminal + ``` + sudo apt-get update && sudo apt-get upgrade -y + sudo apt-get install docker.io + sudo docker build https://github.com/yacy/yacy_grid_mcp.git + ``` + +2. You will get a hash from last command. Copy that hash and do... + ``` + sudo docker tag + ``` + +#### Automated build on Cloud using GitHub repository + +1. Signup for [Docker](https://cloud.docker.com/) +2. Go to Settings > Linked Accounts & Services. +3. Add your GitHub account and select an access level “Public and Private”, or “Limited Access”. +4. Go to your GitHub account. Settings > Applications. +5. Allow access for Docker Hub Registry. +6. Allow service hook for the repository in its settings > Webhooks & Services. +7. Select a source repository to build image in Docker Hub. +8. Enable rebuilding the Docker image when a commit is pushed to the GitHub repository. +9. Congratulations, you have completed the setup of automated image build. diff --git a/docs/installation_google_cloud_docker.md b/docs/installation_google_cloud_docker.md new file mode 100644 index 0000000..16af724 --- /dev/null +++ b/docs/installation_google_cloud_docker.md @@ -0,0 +1,47 @@ +## Installing Yacy on Google Cloud with Docker + + +1. Go to [Google Cloud Free Trial](https://cloud.google.com/free-trial/) and sign up. You will get 300 dollars credit for 12 months. + + +2. Go to the console page: [Console](https://console.cloud.google.com/home) + + +3. If you don’t have any projects, a page that would guide you on how to start a project will pop up. Give your project a name. + + +4. In the search bar above on console page, enter 'Compute Engine' and click on ```Compute Engine```. + + +5. If you have not activated billing for compute engine, click enable billing and choose your account to activate your Compute Engine. Your Google Compute Engine should be activated within a few minutes. + + +6. Click ```Create instance``` to create an instance. In machine type, choose ```small(1 shared vCPU)```. + Choose whatever zone you like. + + In Boot Disk, choose ```Ubuntu 14.04```, and the disk size should be larger than 40GB. + On the bottom of the page, click ```Management, disk, networking, access & security options``` to show more options. Inside of this, click into the tab ```Networking``` and choose ```New static IP``` instead of ```Ephemeral```. Enter a name for your IP. Google will assign a IP for you. + Check the two boxes ```Allow HTTP traffic``` and ```Allow HTTPS traffic```. Finally, click ```Create``` to create an instance. Wait a few minutes for the creation to complete. + + +7. Once the creation has finished, click ssh below to establish web ssh connections. + +8. In the Web Console, enter: + +``` +sudo apt-get update +sudo apt-get upgrade +sudo apt-get -y install docker.io +sudo fallocate -l 4G /swapfile +sudo chmod 600 /swapfile +sudo mkswap /swapfile +sudo swapon /swapfile +sudo docker pull nikhilrayaprolu/yacy_grid_mcp +``` + +Once finished, you will get fully working image. You can check if it exists by entering ```sudo docker images```. +Run our server by entering: +``` +sudo docker run -d -p 8100:8100 -p 443:443 nikhilrayaprolu/yacy_grid_mcp +``` +Enter your assigned HTTP IP address into your browser to check if it is working. diff --git a/docs/installation_google_cloud_kubernetes.md b/docs/installation_google_cloud_kubernetes.md new file mode 100644 index 0000000..7fbb253 --- /dev/null +++ b/docs/installation_google_cloud_kubernetes.md @@ -0,0 +1,87 @@ +# Deploying yacy on Google Cloud Platform with Kubernetes +> **Kubernetes** is an open-source system for automating deployment, scaling, and management of containerized applications. + +Source: https://kubernetes.io/ + +Follow these 10 steps to get an instance of yacy running on Google Cloud platform using Kubernetes. + +**Note**: The document uses predefined names for various properties like project ID and docker image name to avoid confusion. You may want to change them when needed. + +### 1. Create Google Cloud Platform Account +Visit https://cloud.google.com/free/ and follow on-screen instructions to create an account and get the free trial. + +### 2. Create a Project +Create a new project with desired name and ID. + +![kub1](https://cloud.githubusercontent.com/assets/10860278/26034852/c7ff5cac-38e0-11e7-92fb-1fa711a4c05c.png) + +### 3. Create a Container Engine for the Project +Go to https://console.cloud.google.com/kubernetes/list and wait for the container engine to get ready. You may need to select the project from the project section in the top-left corner. + +### 4. Open the Google Cloud Shell +In the top-right panel, click the shell button. + +![screenshot from 2017-05-14 20-11-27](https://cloud.githubusercontent.com/assets/10860278/26034895/9703f85a-38e1-11e7-8dc1-81e38a5205d0.png) + +You'll be greeted by an online console. + +![screenshot from 2017-05-14 20-19-07](https://cloud.githubusercontent.com/assets/10860278/26034960/a8147dbc-38e2-11e7-87a1-b9fef076ee6f.png) + +### 5. Clone the yacy project +```sh +$ git clone https://github.com/yacy/yacy_grid_mcp.git +$ cd yacy_grid_mcp/ +``` + +### 6. Build the Docker Image and Push to Google Container Registry +```sh +$ docker build -t nikhilrayaprolu/yacygridmcp:v1 . +$ docker login -u="$DOCKER_USERNAME" -p="$DOCKER_PASSWORD" +$ docker push nikhilrayaprolu/yacygridmcp +``` +This makes our cloud registry ready. Let us create a Kubernetes cluster where we can deploy this. + +### 7. Creating a Container Cluster +`gcloud` provides easy to use interface for creating clusters. Let us take a look at the properties that we can configure while creating a cluster. + +| Argument | Function | Allowable Values | +|-------------|------------|----------------------| +| `--num-nodes` | Number of nodes in the cluster. | A natural number | +| `--machine-type` | Type of each machine in the cluster. |
  • `f1-micro`
  • `g1-small`
  • `n1-standard-{1,2,4,8}`
  • `n1-highmem-{2,4,8}`
  • `n1-highcpu-{2,4,8}` | +| `--zone` | Zone where nodes would be located. | See [Compute Engine Docs](https://cloud.google.com/compute/docs/regions-zones/regions-zones) | + +For this example, let us create a cluster with following command - +```sh +$ gcloud container clusters create yacy-cluster --num-nodes 3 --machine-type n1-standard-1 --zone us-central1-c +``` +This will take a few minutes to complete. After done, you can see a new cluster active on your console. + +![screenshot from 2017-05-14 21-01-12](https://cloud.githubusercontent.com/assets/10860278/26035369/91ec2912-38e8-11e7-9827-8052896ed842.png) + +### 8. Create a Deployment for the Container Registry +```sh +$ kubectl run yacygridmcp --image=nikhilrayaprolu/yacygridmcp:v1 --port=8100 +deployment "yacygridmcp" created +``` +You can see a list of deployments by running the following commands - +```sh +$ kubectl get deployments +NAME DESIRED CURRENT UP-TO-DATE AVAILABLE AGE +yacygridmcp 1 1 1 1 2m +``` +### 9. Expose the Deployment +With the server now deployed internally on Google Cloud Platform, we need to expose it to the Internet. For this, we use the following command - +```sh +$ kubectl expose deployment yacygridmcp --type=LoadBalancer +service "yacygridmcp" exposed +``` +Now, the platform will assign an external IP to the application. This may take some time. Run the following command to see the assigned external IP - +```sh +$ kubectl get services +NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE +kubernetes 10.79.240.1 443/TCP 10m +yacygridmcp 10.79.248.1 104.154.24.48 80:30287/TCP 1m +``` + +### 10. Visit the Webpage +On a browser, visit the deployment using the external IP (http://104.154.24.48/ in this case). diff --git a/docs/installation_heroku.md b/docs/installation_heroku.md new file mode 100644 index 0000000..e69de29 diff --git a/docs/installation_ibm_bluemix_docker.md b/docs/installation_ibm_bluemix_docker.md new file mode 100644 index 0000000..7a7800c --- /dev/null +++ b/docs/installation_ibm_bluemix_docker.md @@ -0,0 +1,68 @@ + +## Installing Yacy on Bluemix with Docker + +1. Install docker on your system + +2. Get a Bluemix Account with this URL: http://ibm.biz/joinbluemix
    +2.1 Press Sigup and type in your credentials
    +2.2 Check your email and press the validation link
    +2.3 Sign in to bluemix + +3. Make sure you are in US South. The URL is https://console.ng.bluemix.net +(beside US South there is London and Sydney) + +4. Press Dashboard and create a space called dev + +5. Install cloud foundry command line tools for your OS from [here](https://github.com/cloudfoundry/cli/releases) + In Linux: + ``` + dpkg -i cf-cli-version.dep + ``` +6. Install ic plugin as described [here](https://www.ng.bluemix.net/docs/containers/container_cli_ov.html#container_cli_cfic_install) + Linux: + ``` + cf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-linux_x64 + ``` +7. Login to bluemix with + ``` + cf login + ``` + API endpoint is api.ng.bluemix.net +8. Login to docker on bluemix with +cf ic login (No credentials are necessary of you logged in to bluemix before + +9. Create namespace with + ``` + cf ic namespace set + + root@44ee147e1aa5:/# cf ic namespace set hugo + FAILED + { + "code": "IC5090E", + "description": "Cannot assign namespace hugo to org 8b826387-9960-48d6-a409-1c5347b937af. Please ensure the namespace is not already in use.", + "incident_id": "df24a7aedde48fbb", + "name": "NamespaceToOrgAssignError", + "rc": "409", + "type": "Infrastructure" + } + + root@44ee147e1aa5:/# cf ic namespace set ottohttps://codein.withgoogle.com/tasks/5485387342413824/ + otto + ``` +10. Init your docker connection with `cf ic init` + +11. Upload the Yacy docker file to your namespace with `cf ic cpi nikhilrayaprolu/yacy_grid_mcp yacy_grid_mcp` (takes some time) + +12. Create docker group with: (the XXXX must be unique, play around to found a free name) + ``` + cf ic group create --name yacy --auto --desired 2 -m 1024 -n XXXX -d mybluemix.net -p 80 registry.ng.bluemix.net//yacy_grid_mcp + ``` +13. Check if your group is running either with pressing Dashboard in the browser or: + ``` + cf ic group list + ``` +14. Wait until your container group is build and the network is configured (>1 minute) and + ``` + check at https://XXXX.mybluemix.net is working with your version of yacy_grid_mcp + ``` + diff --git a/docs/installation_ibm_bluemix_kubernetes.md b/docs/installation_ibm_bluemix_kubernetes.md new file mode 100644 index 0000000..ea39e1f --- /dev/null +++ b/docs/installation_ibm_bluemix_kubernetes.md @@ -0,0 +1,96 @@ +# Deploy Yacy-Server docker image on Kubernetes Cluster Bluemix + +## Pre-Requisites + +1. Signup for a Bluemix Account [here](https://www.ibm.com/cloud-computing/bluemix/) + +2. Setup Docker on your local machine. Signup at hubs.docker.com , link github with docker and create Repository for your fork Yacy-Server. + Linux: + ``` + Debian: apt-get install docker + RPM: dnf install docker + ``` + Note: the docker repository shall be public + +3. Download and install cloud foundry command line tools for your OS from [here](https://github.com/cloudfoundry/cli/releases) + Linux: + ``` + dpkg -i cf-cli-version.dep + ``` + +4. Install ic plugin as described [here](https://www.ng.bluemix.net/docs/containers/container_cli_ov.html#container_cli_cfic_install) + Linux: + ``` + wget https://www.ng.bluemix.net/docs/containers/container_cli_ov.html#container_cli_cfic_install + cf install-plugin https://static-ice.ng.bluemix.net/ibm-containers-linux_x64 + ``` + +## Login and settings + +5. Login to any region (US South, Sydney or United Kingdom), setup Organization and Space for it. + ``` + Region: United Kingdom + User: nikhil684@gmail.com + Org: BAAC + Space: yacy-server + ``` + +6. Login to bluemix with api endpoint. + ``` + cf login -a + ``` + API endpoint for United Kingdom is `https://api.eu-gb.bluemix.net` + +7. Login/initiate ibm container plugin. + ``` + cf ic login + ``` + or + ``` + cf ic init + ``` + +8. Create namespace with unique name like nikhilrayaprolu. + ``` + cf ic namespace set + ``` + +## Setup + +9. Upload the yacy docker file to your namespace. There are 2 ways to do this: + + a. Upload docker image from your local machine. For docker installation, see [installation_docker.md] + ``` + docker tag //: + docker push //: + ``` + Like: + ``` + docker tag b4de28726243 registry.eu-gb.bluemix.net/nikhilrayaprolu/yacygridmcp:v1 + docker push registry.eu-gb.bluemix.net/nikhilrayaprolu/yacygridmcp:v1 + ``` + + b. Copy docker image from docker public repository. + ``` + cf ic cpi / //: + ``` + Like: + ``` + cf ic cpi nikhilrayaprolu/yacygridmcp registry.eu-gb.bluemix.net/nikhilrayaprolu/yacygridmcp:v1 + ``` + +10. Create Kubernetes Cluster with image uploaded to your private bluemix registry. There are 2 ways: + + a. Go to [catalog](https://console.bluemix.net/catalog/?category=containers) option on your bluemix dashboard and select Container category. Select Kubernetes cluster, select image, create the instance group (preferably Scalable cluster over Single cluster) + + b. Or on terminal: + ``` + cf ic group create --name yacygridmcp --auto --desired 2 -m 1024 -n cloud-yacy -d mybluemix.net -p 80 registry.eu-gb.bluemix.net/nikhilrayaprolu/yacygridmcp:v1 + ``` + +11. Check if your group is running either with pressing Dashboard in the browser or on terminal: + ``` + cf ic group list + ``` + +12. Wait until your container group is built and the network is configured (>1 minute) and then check at your public IP (Single instance) or route (scalable instance group) that is assigned by bluemix.