Marathon-LB customer templates

Here are a couple of templates that worked for me to run the Marathon-LB with some custom settings. Hope this can be a useful example to someone.

Increasing timeout values.

cat << EOL > /local1/marathon-lb/templates/HAPROXY_HEAD
global
  daemon
  log /dev/log local0
  log /dev/log local1 notice
  maxconn 4096
  tune.ssl.default-dh-param 2048
defaults
  log               global
  retries           3
  maxconn           3000
  timeout connect   5s
  timeout client    20m
  timeout server    20m
  option            redispatch
listen stats
  bind 0.0.0.0:9090
  balance
  mode http
  stats enable
  monitor-uri /_haproxy_health_check
EOL
Changing the default HTTP frontend port (80).
 
cat << EOL > /local1/marathon-lb/templates/HAPROXY_HTTP_FRONTEND_HEAD
frontend marathon_http_in
  bind *:8001
  mode http
EOL
 
Changing the default HTTPS frontend port (443).
cat << EOL > /local1/marathon-lb/templates/HAPROXY_HTTPS_FRONTEND_HEAD
frontend marathon_https_in
  bind *:8043 ssl {sslCerts}
  mode http
EOL
Now start a new Marathon-LB container.
docker run -e PORTS=9090 –privileged –net=host -v /local1/marathon-lb/templates:/marathon-lb/templates -d mesosphere/marathon-lb sse –group “*” –marathon http://localhost:8080

Install Marathon on Linux

Note) This is not a bible but is based on my own experience.

Installing Marathon is just very simple.

  • Download Marathon
  • Extract it to somewhere (/opt for example)

Assuming that Mesos is using the Zookeeper cluster of 3 VMs.

If your Mesos library is not in a shared folder, set the following environment variable.

export MESOS_NATIVE_JAVA_LIBRARY=/opt/mesos-1.2.0/build/src/.libs/libmesos.so

/opt/marathon-1.4.2/bin/start –master zk://zookeeper1:2181,zookeeper2:2181,zookeeper3:2181/mesos –zk zk://zookeeper1:2181,zookeeper2:2181,zookeeper3:2181/marathon

Connect your Marathon app.

http://your_host:8080

Simple!

 

Build Mesos on Oracle Linux

Note) This is not a bible, but is just based on my own experience! Tried with Mesos 1.2.0 on Oracle Linux 6 and Oracle Linux 7.

If your system is behind proxy, make sure to add the proxy setting to

  • /etc/yum.conf
    • add “proxy=http://your.proxy.com:80
  • /etc/wgetrc
    • use_proxy=on
    • http_proxy=http://your.proxy.com:80
    • https_proxy=http://your.proxy.com:80
    • no_proxy=”*.your.host localhost”

Update the kernel to UEK4 if it not already.

  • uname -r
    3.8.12…..

    • Then, you need to upgrade kernel!
  • cd /etc/yum.repos.d
  • Edit public-yum-ol6.repo to enable ol6_UEKR4
  • Update kernel to UEK5
  • Reboot your machine

Install dependencies described in http://mesos.apache.org/gettingstarted/

  • Edit public-yum-ol6.repo to enable ol6_addon, ol6_software_collections
  • yum install -y apache-maven python-devel python-six python-virtualenv java-1.8.0-openjdk-devel zlib-devel libcurl-devel openssl-devel cyrus-sasl-devel cyrus-sasl-md5 apr-devel subversion-devel apr-util-devel
    • Make sure to check the latest list of packages to install from Mesos page.
    • “apache-maven” is not probably available. All others should be installed.
  • yum groupinstall -y “Development Tools”

In case of Oracle Linux 6, you probably need to install devtoolset-3 if gcc version is not higher than 4.8.x

  • gcc -dumpversion
    4.4.2
  • yum install devtoolset-3-gcc-c++

Install Maven if apache-maven has not been installed.

  • Download Maven 3.5.x or higher and unzip it.
  • Set the proxy setting in settings.xml if necessary

Download Mesos

  • wget http://archive.apache.org/dist/mesos/1.2.0/mesos-1.2.0.tar.gz
    • Or different version
  • tar xzvf mesos-1.2.0.tar.gz
  • cd mesos-1.2.0
  • mkdir build
  • cd build
  • export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
  • export http_proxy=http://your.proxy.com:port
  • export https_proxy=http://your.proxy.com:port
  • export MAVEN_HOME=/…./apache-maven-3.5.0
  • ../configure
    • If there is an error in finding libjvm.so, try a different openjdk home available in /usr/lib/jvm
  • make
    • This takes time.

Run Mesos master: Assuming that you have a zookeeper cluster of 3 VMs.

  • In case of Oracle Linux 6, you need to enable devtoolset-3
    • scl enable devtoolset-3
  • ./bin/mesos-master.sh –zk=zk://zookeeper1:2181,zookeeper2:2182,zookeeper3:2181/mesos –port=5050 –log_dir=/var/log/mesos –logging_level=WARNING –quorum=2 –work_dir=/var/lib/mesos –hostname=known_host_name_of_your_mesos_master –advertise_ip=xxx.xxx.xxx.xxx –cluster=$DISPLAY_NAME
    • hostname: give the host name of your mesos master machine
    • advertise_ip: A public IP of the host
    • cluster: A display name of this cluster
  • http://hostname:5050

Run Mesos agent

  • In case of Oracle Linux 6, you need to enable devtoolset-3
    • scl enable devtoolset-3
  • ./bin/mesos-slave.sh –master=zk://zookeeper1:2181,zookeeper2:2182,zookeeper3:2181/mesos –log_dir=/var/log/mesos –logging_level=WARNING –work_dir=/var/lib/mesos –advertise_ip=xxx.xxx.xxx.xxxx –containerizers=docker,mesos –executor_registration_timeout=10mins
    • advertise_ip: A public IP of the host
    • containerizers:  Give docker if your machien has a Docker installed.
  • Your agent must be found in the master’s “Agents” section.

Simple!

 

Use my Agile? It is the culture, Stupid!

When organisations have an inefficient software project management practice or are struggling with never-reducing backlogs, they consider to adapt Agile. Then they bring some Agile consultants and expect some changes to happen. In most cases they don’t understand that going for Agile is actually a larger-than-expected cultural transformation across all stakeholder groups like internal/external customers and product management. Heavily depending on external consultants is like placing traffic cops from other countries in the roads with heavy congestion and expecting improved road traffic. It may be working. But it is probably not working properly.

Another interesting observation is people’s bias on their ability. This is about the well-known Overconfidence Effect. People tend to believe that their ability (e.g. Driving) is better than average (actually median). I have observed a few people who strongly believe they understand the Agile concepts and Scrum methodology well and the way they practice Agile/Scrum goes right way.

So what can be the bad combination in an Agile team?

  • Scrum masters that do not understand the organisation’s culture
  • Development team with over-confidence on their current practices
  • Customers who do not want to engage in Agile

And what can be the results? I see the results different mostly based on how people react to the situations they don’t want to be encountered.

  • Scrum masters with strong ego may try to push their way ahead. Despite their strong belief in their direction and their strong skills, they can get backlash from developers and internal organisations if they don’t carefully study the current culture of the organisation. In reality, they need strong support from top-level management.
  • Scrum masters who want to be easy-going with less conflict generate less noise. But soon they might feel that they are a bit useless.
  • Developers from different Agile culture get easily tired when they observe that something is not working properly or in the way they expected.
  • Internal customers never engage in providing right stories. Rather, they would like to throw a huge document with everything in it.

The right steps for the Agile evangelist are

  1. Understand the strategy of the organisation
  2. Understand the culture of the organisation
  3. Understand the new culture that the organisation needs to have.
  4. Find the right way to implement the change. Study famous top-down cultural change processes.
    1. Force-Field Model
    2. Kotter’s Eight-Stage Model
  5. Plan the implementation of new Agile culture
  6. Build the right team for the change

Black background slide

I like to use black-background slides in my presentation. I often used other dark colours in my recent presentation slides. I was surprised that someone does not like to use colours in background. It is anyway a matter of personal choice though.

I think black background is particularly good to emphasise the point I want to deliver to audience. Look at the black version below. For me, it delivers the text ver clearly yet the slide feels very comfortable.

Black background

And look at the white version. Not bad, but the slide feels something is empty. It just looks like a slide missing something. I think the white background is more suitable when the slide is fairly full with contents.

White background

Two months ago, I was lucky that I could use the dark template for the group marketing project. I got the privilege to design the presentation slides at the cost of doing majority of researches and making many slides. In the project my group is working for, I probably have to make a compromise to use a white version.

But I am happy that I found 5 good reasons why black is the new white.