Quick instructions on how install CentOS 7, Mesos and Marathon from scratch.
Disk partition (your choice of partitions)
/ 200GB /home 200GB swap 32GB
Install with SOFTWARE SELECTION -> Infrastructure Server
Options: (or your choice of other options)
Supply root password
Reboot after installation
if you are concerned that a single switch failure might knock down a dozen of your servers
Login as root, launch network management tool: nmtui
Select "Edit a connection"
Select "Add"
Select "Bond" and “Create”
In Device, type in bond name (for example “bond1”), and in BOND Slaves: add network interfaces
Continue with bond network configuration, IP address, netmask, etc.
2. Some commands to see configured network
# Setting to install every package from a group group_package_types=default, mandatory, optional
Install Development Tools group
Increase system wide hard limit, and the number of open files in inotify watches
Increase soft limit
make effect sysctl -p
View varies firewall settings
Open a port to public
Show and Change system init level
System commands
systemctl poweroff|reboot
systemctl
rescue
put into single user mode
systemd-analyze blame
systemctl list-dependencies
systemctl
list-dependencies memcached --all
list all dependent
services "memcached" has, “--all” is to display all
levels
Set resource limits for a particular service
systemctl list-units
systemctl show ntpd.service |grep CPU
DropInPaths=/etc/systemd/system/ntpd.service.d/90-CPUShares.conf
LimitCPU=18446744073709551615
CPUSchedulingPolicy=0
CPUSchedulingPriority=0
CPUSchedulingResetOnFork=no
CPUAccounting=no
CPUShares=1024
systemctl set-property ntpd.service CPUShares=256
systemctl show ntpd.service |grep CPU
DropInPaths=/etc/systemd/system/ntpd.service.d/90-CPUShares.conf
LimitCPU=18446744073709551615
CPUSchedulingPolicy=0
CPUSchedulingPriority=0
CPUSchedulingResetOnFork=no
CPUAccounting=no
CPUShares=256
Start ntpd.service
Edit environment file: /etc/sysconfig/foobar
FOO1=12345 FOO2=98765
Edit service config file: /etc/systemd/system/foobar.service
[Unit] Description=My FooBar After=ntpd.service squid.service Requires=ntpd.service squid.service [Service] # the type can be: # forking – the startup program will fork a subprocess # normal -- the startup program is a long running service, # so systemd will fork a subprocess for this service # oneshot – the service will run and exit # Type=oneshot # define environment variables used in startup program EnvironmentFile=-/etc/sysconfig/foobar UMask=0002 # create a directory before starting the service # starting “-” means continue even this command failed ExecStartPre=-/bin/mkdir /tmp/foobar_cache # command line variable ${FOO1} will use /etc/sysconfig/foobar # ${FOO1} and ${FOO2} are also visible inside /root/foobar.sh ExecStart=/root/foobar.sh ${FOO1} User=mylogin Group=users [Install] WantedBy=multi-user.target
Enable and run foobar service
Deployed mesos on /usr/local/bin/, /usr/local/lib/, /usr/local/include/mesos/, /usr/local/libexec/mesos/, etc.
Start Zookeeper and test with CLI client
start master and slave
Verify
Go to http://192.168.1.100:5050/
run test framework
Start Marathon
Verify
Send a JSON configuration to Marathon
Prepare a test JSON input file marathon.json
{ "id": "/product/service/myapp", "cmd": "env && sleep 300", "cpus": 1.5, "mem": 256.0 }
Launch this app to Marathon
Check running statuses