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

Deploy development branch and master branch to Google Cloud with Kubernetes #1224

Open
mariobehling opened this issue Jun 5, 2017 · 6 comments

Comments

@mariobehling
Copy link
Member

mariobehling commented Jun 5, 2017

Most developers have already deployed loklak to Google cloud. How can we now automate this process and automatically deploy loklak to the cloud.

There should be two deployments:

  1. Deployment from development branch for testing.
  2. Deployment from master branch for production.

Before we switch the loklak domain to the cloud deployment, please implement the flow and test it for several days.

@mariobehling
Copy link
Member Author

@sarishinohara @djmgit @kavithaenair @vibhcool @Achint08 @hemantjadon @singhpratyush @SKrPl This has a high priority for all of us.

@Orbiter
Copy link
Member

Orbiter commented Jul 21, 2017

Kubernetes is a good thing but it's there to scale stateless microservices. loklak has two storage locations which makes it a stateful microservice: the embedded elasticsearch and data dumps. In case that we use loklak services only for scraping we can just ignore that statefull behaviour but must then take care of the storage space that is used. We can also turn loklak into a full stateless microservice by:

  • using an external elasticsearch (thats possible right now), and
  • switching off the dump generation (that must be implemented with a flag).

for both we need a deployment with special settings. To go for full stateless microserivce operation we must implement the second point.

@singhpratyush
Copy link
Member

@Orbiter @mariobehling @niranjan94 @kavithaenair

using an external elasticsearch

External Elasticsearch would be very helpful in the Kubernetes environment. Once we have the correct configurations, adding new nodes can be as simple as kubectl scale --replicas=n ....

Also, for building this image, we would require a separate Docerfile as we'll need to change config.properties so that loklak uses external cluster.

Right now, we've implemented the version where Elasticsearch and loklak server are on the same node and things are working fine. We've rolling updates functional and messages are retained in the persistent storage. This image can be used by people who want to host their own loklak instance.

switching off the dump generation (that must be implemented with a flag).

This will not be happening for other servers other than api.loklak.org, right?
Should I create an issue for this?

@singhpratyush
Copy link
Member

singhpratyush commented Jul 21, 2017

Also, we can have development and master sharing the same data (ES index) but serving on different loklak API versions and URLs.

@niranjan94
Copy link
Member

Also, we can have development and master sharing the same data but serving on different loklak API versions

That is not right. What if the schema of data changes in dev for some reason ? That'll affect the master too since it'll be running on a different version.

@singhpratyush
Copy link
Member

@niranjan94: I think you are right (no mapping version for ES(?)). In this case, development can also be one of the

people who want to host their own loklak instance

singhpratyush added a commit to singhpratyush/loklak_server that referenced this issue Aug 8, 2017
singhpratyush added a commit to singhpratyush/loklak_server that referenced this issue Aug 8, 2017
singhpratyush added a commit to singhpratyush/loklak_server that referenced this issue Aug 9, 2017
singhpratyush added a commit to singhpratyush/loklak_server that referenced this issue Aug 11, 2017
mariobehling pushed a commit that referenced this issue Aug 13, 2017
* Fixes #1402: Revert changes to backend in config.properties (#1403)

* Fixes #1387: Remove TwitterTweet methods from MessageEntry Class (#1388)

* Fix #1404: Change backend to root.loklak.org for Kubernetes images (#1405)

* Fix #1395 - Add mosquitto Kubernetes yamls to development branch (#1398)

* Fixes #1408: Post id doesn't appear in when source set to cache in search endpoint (#1409)

* Fix #1411: Add protocol for MQTT URI in Kubernetes Dockerfile (#1412)

* Fix #1406: Add methods to publish multiple message on multiple channels (#1407)

* final version (#1418)

* Fix #1413: Add MQTT publish hook in Post object (#1414)

* Related #1224: Add YAMLs for master deployment (#1377)

* Fixes #1350: Additional information added for display in StatusService (#1428)

* Fix #1424: Add channels to publish a Tweet on (#1427)

* Refactoring try-finally block to try resource block (#1426)

* Fix #1421: Add Docker images for different deployments (#1423)

* Fixes #1416: Deprecated Apache Ant in bluemix one click (#1417)

* Fix #1435: Add configurations for api.loklak.org deployment (#1436)

* Add use documentation, fix bug in the code (#1440)

* Related to #1439: Enhances the api.loklak.org page (#1441)

* Fix #1419: Remove readiness probe and increase initial delay (#1420)

Also introduce a gap of 300 seconds between probes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment