Run apps on unique mesos-slaves - mesos

I am running two different apps on a Mesos-cluster using Marathon. I want these apps to be launched on different slaves always (even while scaling up). Can someone help?

I think you're looking for a UNIQUE operator in Marathon. More details here: https://github.com/mesosphere/marathon/blob/master/docs/docs/constraints.md

Related

Parallel automation in Selenium

I am new to Selenium.
My doubt is,
After submitting credential form during automation (login), is it possible to create multiple driver instance, and have multiple browser windows and run events parallely in different threads, by injecting sessions/cookies to increase performance. I learned its not possible to work on different tabs parallely.
My main concern is regarding the time consumption. Would it cost have multiple driver instances?
Thanks in advance.
Happy coding :)
Yes its possible.
Try to use selenium grid documentation can be found here in order to parallelization
It allows to run tests in parallel on multiple machines
I recommend to use it with docker if you are going to work on a local environment
You can found more info here Selenium docker github
Regarding your question, its better to work on different browser instances than trying to work on different tabs.
The only cost will be the infrastructure cost, you can use testing frameworks in python like pytest to parallelize your test execution against selenium grid

OpenShift New Installation

I am new to OpenShift and ansible. I in the process of on a POC for an OpenShift installation.
1.What a typical installation of OpenShift in a POC environment looks like? I was thinking one master, one infrastructure, and one application node.
2.How long does a normal installation take for first timers?
3.Where would the registry reside?
4.Will the route on the master?
This may answer some of your questions. Maybe go though the actual install process yourself so you can see what is involved and how long it takes.
https://developers.redhat.com/blog/2017/02/23/openshift-for-developers-set-up-a-full-cluster-in-under-30-minutes/
Specifically
1 - The pre-requisites will probably answer how many you will need as this can vary based on need.
https://docs.openshift.org/latest/install_config/install/prerequisites.html
So 3-3-3 for redundancy, failover etc can be a good setup.
2 - It can really depend since there are many different variables like how many masters, how many nodes etc etc. In the video he does a simple installation with ansible in about 30 minutes.
3- For us our registry is running on our infrastructure nodes with storage to s3
4 - not sure I understand this one sorry.

How many Marathon clusters / frameworks can Mesos handle?

Marathon does not support task configuration template which can establish command patterns and avoid redundancy. We are trying to find a way around it, otherwise we need to create 100,000s tasks and it would be very difficult to manage those config files. One approach, we are thinking is running multiple marathon clusters inside mesos. Now the question is can we run multiple marathon clusters inside mesos? And is there a limit number of frameworks mesos can handle?
Yes, multiple Marathon frameworks is not only possible but actually considered a best practices. There are many use cases, from scaling to Chinese Wall setups (esp. in financial services area).
For example, in the DCOS we're installing a 'system Marathon' per default and you can then install as many 'application' or 'project' or 'group' Marathons as you like.
I'm not aware of a theoretical limit of the number of frameworks, but hey, this might actually be a good load test to run, I'll look into it.

How to use a "Rocks" cluster

I've just joined a research lab at my University and been given access to a Cluster to compile and run the c++ code that I write. I use SSH to access it and simply use the cluster like a Linux terminal.
I often have to wait a relatively long time while my code runs. I'm trying to figure out if there's a more efficient way use the Cluster. For example, there are different CPUs/Nodes in the cluster, some of which are more in use and others less in use. How do I access a specific CPU? I have access to the "Ganglia" overview page which gives information about the different Nodes.
Also, if I run 2 processes in a different SSH windows will it automatically use different processors or nodes, or do I have to manually specify that.
I couldn't find any documentation to help me with these issues, so I'd appreciate a little help.
Thanks
Simply running something on a cluster does not mean it is taking advantage of the cluster at all. By default, it will probably just run on the head node. Software needs to be written specifically for a cluster.
There is likely to be some kind of scheduler running that you need to interface with. Perhaps you could also see if distcc is installed and configured for your particular cluster (for doing the compilation across multiple machines). There may also be a particular flavour of MPI running to allow processes on different nodes to communicate.
Clusters software setups tend to be very specialised to the hardware and computing environment. Really, I would recommend that you ask someone who has used the machine before these kinds of questions, because any advice you receive here is unlikely to be completely accurate for your particular cluster.

Managing server instance identity on EC2

I recently brought up a cluster on EC2, and I felt like I had to invent a lot of things. I'm wondering what kinds of tools, patterns, ideas are out there for how to deal with this.
Some context:
I had 3 different kinds of servers, so first I created AMIs for each of them. The first AMI had zookeeper, so step one in deploying the system was to get the zookeeper server running.
My script then made a note of the mapping between EC2's completely arbitrary and unpredictable hostnames, and the zookeeper server.
Then as I brought up new instances of the other 2 kinds of servers, the first thing I would do is ssh to the new server, and add the zookeeper server to its /etc/hosts file. Then as the server software on each instance starts up, it can find zookeeper.
Obviously this is a problem that lots of people have to solve, and it probably works a little bit differently in different clouds.
Are there products that address this concept? I was pretty surprised that EC2 didn't provide some kind of way to tie your own name to its name.
Thanks for any ideas.
How to do some service discovery on Amazon EC2 seems to have some good options.
I think you might want to look at http://puppetlabs.com/mcollective/introduction/ and the suite of tools from http://puppetlabs.com in general.
From the site:
The Marionette Collective AKA MCollective is a framework to build server orchestration or parallel job execution systems.
Primarily we’ll use it as a means of programmatic execution of Systems Administration actions on clusters of servers. In this regard we operate in the same space as tools like Func, Fabric or Capistrano.
I am fairly certain mcollective was built to solve exactly the problem you are trying to address. But, be forewarned, it's not a DNS-based solution, it's a method of addressing arbitrarily large and arbitrarily tagged groups of hosts.

Resources