Google Compute Engine Automated Load Test VM Instance? - kubernetes

I have a simple web server application in a docker container that I have pinned to a vm instance in GCP Compute Engine.
I am wondering how to set up automated load testing (Locust load testing via GKE) on the web server application running on my VM instance?
I saw a tutorial here: https://cloud.google.com/solutions/distributed-load-testing-using-gke. But this involves using App Engine. I am not able to find a GCP tutorial to auto load test vm instances in Compute Engine.
Any links or ideas?

The tutorial comprises of a project that you clone from github. from that project you deploy a sample-webapp to Google Compute Engine, with a domain such as test1.appspot.com.
This test1.appspot.com is the target for the Locust cluster.
This sample-webapp is a simple Flask app that you can copy and deploy in your instance in GCP (there are several ways of accomplishing this). Once the app is deployed and reachable from the internet, you need supply its address/domain as the target for the Locust cluster.

Related

The best practice for developing app locally which then be deployed to Kubernetes

Let's say I have a flask app, a PostgreSQL, and a Redis app. what is the best practice way to develop those apps locally which then later be deployed to Kubernetes.
Because, I have tried to develop in minikube with ksync, but I get difficulties in getting detailed debug log information.
Any ideas?
What we do with our systems is that we develop and test them locally. I am not very knowledgeable with Flask and ksyncy, but say for example, you are using Lagom Microservices Framework in Java, you run you app locally using the SBT shell where you can view all your logs. We then automate the deployment using LightBend Orchestration.
When you then decide to test the app on Kubernetes, you can choose to use minikube, but you have to configure the logging properly. You can configure centralised logging for Kubernetes using the EFK stack. This will collect all the logs from the various components of your app and store them in Elastic Search. You can then view these logs using The Kibana Dashboard. You can do a lot with the dashboard, you can view logs for a given period, or search logs by k8s namespace, or by container.
There are multiple solutions for this (aka GitOps with Kubernetes):
Skaffold
Draft
Flux - IMO the most mature.
Ksonnet
GitKube
Argo - A bit more of a workflow engine.
Metaparticle - Deploy with actual code.
I think the solution is using skaffold

How to deploy Hyperledger Fabric V1.0 network in production level?

I have setup a Hyperledger Fabric V1.0 Network by following the Hyperledger-fabric docs and using fabric-sdk-java client I am able to communicate with the network from my java application. Now everything is working fine in the development setup. But still I am not getting the clear picture about its production level implemenation. Looking for some valuable suggestions for the following points to make it production live.
Will it be possible to use this setup for production? then how can I build my network using this docker-compose setup? Which are the options available for production hosting of the network?
If it is possible to setup in production, should I run this docker-compose set up and all in all the peer system's, then how will I configure the docker-compose.yaml to define each of the peers/organisations which are in different system?
I have found Bluemix Blockchain Service as an alternative, but it is having high monthly charges. So is there any alternative to deploy myown Hyperledger Fabric V1.0 network by defining myown peers and organization?
I think that for a production deployment, you'd likely want to implement Swarm or Kubernetes. See Hyperledger Cello for instance. You will also want to have a process and automation for managing the code going forward. Updating images, chaincode, etc. Further, you might want to further automate some of the on-boarding process which at present is rather bare bones.
As noted above, the Docker Compose is designed for a single system. You'd likely want to use Swarm or Kubernetes to manage nodes on different systems and you want decentralized operations when you are engaging multiple entities into a consortia where the members want to choose where they run their nodes.
There is a developer sandbox offering that you can deploy to IBM's Container service (Kubernetes) but you won't be getting the benefits of the crypto acceleration, HSM, and added security of the LinuxOne platform on which IBM deploys the IBM Blockchain Platform. The good things in life may be free, but I would want to have the added value of a vendor provided cloud offering like IBM Blockchain Platform for my production system. YMMV.

How do I deploy server-side Swift on google cloud platform?

Im interested in implementing server-side swift on Google Cloud using "Perfect". Though Im quite new to server side, some guidance in implementing this would be helpful !
Knowing nothing about Perfect, I read Perfect's github page and see that in runs on Linux. Therefore, I see three ways to run Perfect on Google Cloud Platform, in order from easiest to most complicated:
On a Linux Virtual Machine in Google Compute Engine.
Building a custom docker image and running it in the App Engine Flexible Environment.
Building a custom docker image and running it in Container Engine.
If you're already familiar with Docker or Kubernetes, then options 2 or 3 may be easier for you.

How to deploy internal MobileFirst hybrid application to dedicated Bluemix environment?

I would like to know the different approaches to deploy the locally built MobileFirst hybrid application to dedicated Bluemix environment.
I have used containers from public Bluemix environment to create worklight console to deploy wlapp and adapter files. Containers are not available in dedicated Bluemix environment.
Is there anything we can do to deploy the files in dedicated environment?
Thanks in advance.
The ability to use containers in a dedicated Bluemix environment is not supported at this time.
That is correct that the IBM Container Service is not yet available as part of the Bluemix Dedicated offering but we are working on making the Container Service available in the dedicated offering so stay tuned.
Dan

Play framework in Scala deployment

I'm a Ruby developer, but I like Scala very much as well.
For Rails framework we have awesome tools that supports deployments like Capistrano automation tool and Puma/Unicorn servers. With simple cookbooks using Chef or Ansible I can easily setup my VPS and deploy Rails application there.
How does automatic deployment look like in Play framework? What is minimal required stack for developing and deploying Play applications? Are there any tools for automatic deployment? What are recommended application servers?
All you need to run a Play app is a JVM. Play is container-less. So deploying your Play app in production is as simple as running a script that invokes a fat jar with all the other required jars in the classpath.
$play dist should generate a zip file that contains everything you need to run the app.
You can use Ansbile to automate.
http://code.hootsuite.com/automating-our-scala-deploys-with-ansible-case-study/
http://www.ansible.com/press-release/ansibleworks-typesafe
To deploy Play Framework apps in AWS (Amazon) ec2 using Ansible playbook
As well as Chef.
https://github.com/gildegoma/chef-typesafe-stack
If you are happy to run on AWS, Boxfuse comes with native Play 2 support.
You can now simply execute boxfuse run my-play-app-1.0.zip -env=prod and this will automatically:
create a minimal AMI tailor-made for your Play 2 app
create an elastic IP
create a security group with the correct permissions
launch an instance of your app
All future updates are performed as blue/green deployments with zero downtime.
This also works with Elastic Load Balancers and Auto-Scaling Groups and the Boxfuse free tier is designed to fit the AWS free tier.
You can read more about it here: https://boxfuse.com/blog/playframework-aws
Disclaimer: I'm the founder and CEO of Boxfuse