airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject airavata git commit: remove exhibitor generated config, initial systemd units
Date Mon, 22 Aug 2016 07:06:18 GMT
Repository: airavata
Updated Branches:
  refs/heads/lahiru/airavata-docker 83b60255b -> b82a020ca


remove exhibitor generated config, initial systemd units


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/b82a020c
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/b82a020c
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/b82a020c

Branch: refs/heads/lahiru/airavata-docker
Commit: b82a020caab385eb8b24f1354eea7b448409b1ff
Parents: 83b6025
Author: Lahiru Ginnaliya Gamathige <lahiru@apache.org>
Authored: Mon Aug 22 00:05:40 2016 -0700
Committer: Lahiru Ginnaliya Gamathige <lahiru@apache.org>
Committed: Mon Aug 22 00:05:40 2016 -0700

----------------------------------------------------------------------
 deploy/images/exhibitor/exhibitor.properties | 51 +----------------------
 deploy/systemd/aws-metadata.service          | 19 +++++++++
 deploy/systemd/consul-download.service       | 11 +++++
 deploy/systemd/consul.service                |  8 ++++
 deploy/systemd/zookeeper.service             | 14 +++++++
 5 files changed, 53 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/b82a020c/deploy/images/exhibitor/exhibitor.properties
----------------------------------------------------------------------
diff --git a/deploy/images/exhibitor/exhibitor.properties b/deploy/images/exhibitor/exhibitor.properties
index 4a13a27..b099e60 100644
--- a/deploy/images/exhibitor/exhibitor.properties
+++ b/deploy/images/exhibitor/exhibitor.properties
@@ -11,53 +11,4 @@ observer-threshold=4
 election-port=3888
 zoo-cfg-extra=syncLimit\=5&tickTime\=2000&initLimit\=10
 auto-manage-instances-settling-period-ms=10000
-auto-manage-instances=1
-
-#Auto-generated by Exhibitor 10.0.10.110
-#Tue Feb 02 00:24:31 UTC 2016
-com.netflix.exhibitor-rolling-hostnames=
-com.netflix.exhibitor-rolling.zookeeper-data-directory=/zookeeper/data
-com.netflix.exhibitor-rolling.servers-spec=1\:192.168.59.103
-com.netflix.exhibitor.java-environment=export JAVA_OPTS\="-Xms1000m -Xmx1000m"
-com.netflix.exhibitor.zookeeper-data-directory=/zookeeper/data
-com.netflix.exhibitor-rolling-hostnames-index=0
-com.netflix.exhibitor-rolling.java-environment=export JAVA_OPTS\="-Xms1000m -Xmx1000m"
-com.netflix.exhibitor-rolling.observer-threshold=4
-com.netflix.exhibitor.servers-spec=1\:192.168.59.103
-com.netflix.exhibitor.cleanup-period-ms=200000
-com.netflix.exhibitor.auto-manage-instances-fixed-ensemble-size=0
-com.netflix.exhibitor.zookeeper-install-directory=/zookeeper
-com.netflix.exhibitor.check-ms=2000
-com.netflix.exhibitor.zookeeper-log-directory=
-com.netflix.exhibitor-rolling.auto-manage-instances=0
-com.netflix.exhibitor-rolling.cleanup-period-ms=200000
-com.netflix.exhibitor-rolling.auto-manage-instances-settling-period-ms=5000
-com.netflix.exhibitor-rolling.check-ms=2000
-com.netflix.exhibitor.log-index-directory=
-com.netflix.exhibitor-rolling.log-index-directory=
-com.netflix.exhibitor.backup-period-ms=60000
-com.netflix.exhibitor-rolling.connect-port=2888
-com.netflix.exhibitor-rolling.election-port=3888
-com.netflix.exhibitor-rolling.backup-extra=
-com.netflix.exhibitor.client-port=2181
-com.netflix.exhibitor-rolling.zoo-cfg-extra=syncLimit\=5&tickTime\=2000&initLimit\=10
-com.netflix.exhibitor-rolling.zookeeper-install-directory=/zookeeper
-com.netflix.exhibitor.cleanup-max-files=10
-com.netflix.exhibitor-rolling.auto-manage-instances-fixed-ensemble-size=0
-com.netflix.exhibitor-rolling.backup-period-ms=60000
-com.netflix.exhibitor-rolling.client-port=2181
-com.netflix.exhibitor.backup-max-store-ms=86400000
-com.netflix.exhibitor-rolling.cleanup-max-files=10
-com.netflix.exhibitor-rolling.backup-max-store-ms=86400000
-com.netflix.exhibitor.connect-port=2888
-com.netflix.exhibitor.backup-extra=
-com.netflix.exhibitor.observer-threshold=4
-com.netflix.exhibitor.log4j-properties=
-com.netflix.exhibitor.auto-manage-instances-apply-all-at-once=1
-com.netflix.exhibitor.election-port=3888
-com.netflix.exhibitor-rolling.auto-manage-instances-apply-all-at-once=1
-com.netflix.exhibitor.zoo-cfg-extra=syncLimit\=5&tickTime\=2000&initLimit\=10
-com.netflix.exhibitor-rolling.zookeeper-log-directory=
-com.netflix.exhibitor.auto-manage-instances-settling-period-ms=5000
-com.netflix.exhibitor-rolling.log4j-properties=
-com.netflix.exhibitor.auto-manage-instances=0
+auto-manage-instances=1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b82a020c/deploy/systemd/aws-metadata.service
----------------------------------------------------------------------
diff --git a/deploy/systemd/aws-metadata.service b/deploy/systemd/aws-metadata.service
new file mode 100644
index 0000000..ac8ef57
--- /dev/null
+++ b/deploy/systemd/aws-metadata.service
@@ -0,0 +1,19 @@
+[Unit]
+Description=Loads AWS Metadata
+After=network-online.target
+Wants=network-online.target
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=/etc/environment
+ExecStart=-/usr/bin/bash -c "systemctl set-environment AWS_REGION=$(curl -s http://[ip]/latest/meta-data/placement/availability-zone
| sed -e 's/[a-z]$//')"
+ExecStart=-/usr/bin/bash -c "systemctl set-environment AWS_HOSTNAME=$(curl -s http://[ip]/latest/meta-data/local-hostname)"
+ExecStart=-/usr/bin/bash -c "systemctl set-environment AWS_ZONE=$(curl -s http://[ip]/latest/meta-data/placement/availability-zone)"
+ExecStart=-/usr/bin/bash -c "systemctl set-environment AWS_INSTANCE_TYPE=$(curl -s http://[ip]/latest/meta-data/instance-type)"
+ExecStart=-/usr/bin/bash -c "systemctl set-environment COREOS_PRIVATE_IPV4=${COREOS_PRIVATE_IPV4}"
+ExecStart=-/usr/bin/bash -c "systemctl set-environment COREOS_PUBLIC_IPV4=${COREOS_PUBLIC_IPV4}"
+ExecStart=-/usr/bin/bash -c "systemctl set-environment COREOS_FREE_DISK=$(df -l | awk '{
s+=$4 } END {print s}')"
+ExecStart=-/usr/bin/bash -c "systemctl set-environment COREOS_TOTAL_MEM=$(cat /proc/meminfo
| grep MemTotal | awk '{print $2/1024+2048}')"
+ExecStart=-/usr/bin/bash -c "systemctl set-environment COREOS_TOTAL_CPUS=$(cat /proc/cpuinfo
| grep processor | wc -l | awk  '{print $s*2}')"
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/airavata/blob/b82a020c/deploy/systemd/consul-download.service
----------------------------------------------------------------------
diff --git a/deploy/systemd/consul-download.service b/deploy/systemd/consul-download.service
new file mode 100644
index 0000000..c430bb8
--- /dev/null
+++ b/deploy/systemd/consul-download.service
@@ -0,0 +1,11 @@
+[Unit]
+Description=Downloads Consul
+After=network-online.target
+Wants=network-online.target
+ConditionPathExists=!/opt/consul/0.6.3/consul
+[Service]
+Type=oneshot
+Environment=CONSUL_VERSION=0.6.3
+ExecStartPre=/usr/bin/bash -c 'wget --progress=dot -e dotbytes=10M https://releases.hashicorp.com/consul/${CONSUL_VERSION}/consul_${CONSUL_VERSION}_linux_amd64.zip
-O /tmp/consul.zip'
+ExecStartPre=/usr/bin/bash -c "mkdir -p /opt/bin /opt/consul/${CONSUL_VERSION}"
+ExecStart=/usr/bin/bash -c "/usr/bin/unzip -o /tmp/consul.zip -d /opt/consul/${CONSUL_VERSION}
&& ln -sf /opt/consul/${CONSUL_VERSION}/consul /opt/bin/consul"

http://git-wip-us.apache.org/repos/asf/airavata/blob/b82a020c/deploy/systemd/consul.service
----------------------------------------------------------------------
diff --git a/deploy/systemd/consul.service b/deploy/systemd/consul.service
new file mode 100644
index 0000000..4a887f6
--- /dev/null
+++ b/deploy/systemd/consul.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Consul Service Discovery and DNS
+After=consul-download.service aws-metadata.service
+Requires=consul-download.service aws-metadata.service
+[Service]
+EnvironmentFile=/etc/environment
+Restart=on-failure
+ExecStart=/opt/bin/consul agent -server -data-dir /var/lib/consul -bind ${COREOS_PRIVATE_IPV4}
-dc ${AWS_REGION} -config-file /etc/consul/config.json -ui -client 0.0.0.0

http://git-wip-us.apache.org/repos/asf/airavata/blob/b82a020c/deploy/systemd/zookeeper.service
----------------------------------------------------------------------
diff --git a/deploy/systemd/zookeeper.service b/deploy/systemd/zookeeper.service
new file mode 100644
index 0000000..38e631b
--- /dev/null
+++ b/deploy/systemd/zookeeper.service
@@ -0,0 +1,14 @@
+[Unit]
+Description=Exhibitor and Zookeeper
+After=docker.service
+Requires=docker.service
+[Service]
+EnvironmentFile=/etc/environment
+TimeoutStartSec=60
+Restart=on-failure
+ExecStartPre=-/usr/bin/docker rm -f zookeeper
+ExecStartPre=-/usr/bin/docker pull scigap/exhibitor
+    ExecStart=/usr/bin/docker run --net=host --name zookeeper -v /var/lib/zookeeper/data:/zookeeper/data
scigap/exhibitor --hostname ${COREOS_PRIVATE_IPV4} --port 8081
+ExecStop=/usr/bin/docker stop zookeeper
+[Install]
+WantedBy=multi-user.target
\ No newline at end of file


Mime
View raw message