Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
compose.libre.sh
Manage
Activity
Members
Labels
Plan
Issues
18
Issue boards
Milestones
Wiki
Code
Merge requests
3
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libre.sh
compose.libre.sh
Commits
d212a68b
Commit
d212a68b
authored
10 years ago
by
Michiel de Jong
Browse files
Options
Downloads
Patches
Plain Diff
On ubuntu, run etcd as a systemd unit
parent
5b0ac206
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/running-on-ubuntu.md
+28
-13
28 additions, 13 deletions
doc/running-on-ubuntu.md
with
28 additions
and
13 deletions
doc/running-on-ubuntu.md
+
28
−
13
View file @
d212a68b
To run an IndieHosters on ubuntu 14.10 (earlier versions will not work), run something like:
apt-get update && apt-get -y upgrade
dpkg-reconfigure -plow unattended-upgrades
# set unattended upgrades to 'Yes'
apt-get -y install systemd-sysv git docker.io
docker run -d --restart='always' -p 4001:4001 quay.io/coreos/etcd:v0.4.6
echo "#!/bin/sh" > /usr/local/etcdctl
echo "docker run --net=host quay.io/coreos/etcd:v0.4.6 /etcdctl $1 $2 $3 $4" >> /usr/local/etcdctl
shutdown -r now
````
bash
apt-get update
&&
apt-get
-y
upgrade
&&
apt-get
-y
dist-upgrade
dpkg-reconfigure
-plow
unattended-upgrades
# set unattended upgrades to 'Yes'
apt-get
-y
install
systemd-sysv git docker.io
printf
"#!/bin/sh
\n
docker run --net=host quay.io/coreos/etcd:v0.4.6 /etcdctl
$1
$2
$3
$4
"
>>
/usr/local/etcdctl
printf
"[Unit]
\n
Requires=docker.service
\n
After=docker.service
\n
[Service]
\n
Restart=always
\n\
ExecStartPre=-/usr/bin/docker kill etcd
\n\
ExecStartPre=-/usr/bin/docker rm etcd
\n\
ExecStart=/usr/bin/docker run
\
--name etcd
\
-p 4001:4001
\
quay.io/coreos/etcd:v0.4.6
\n\
ExecReload=/usr/bin/docker restart etcd
\n\
ExecStop=/usr/bin/docker stop etcd
\n\
[Install]
\n\
WantedBy=multi-user.target
\n
"
>
/etc/systemd/system/etcd.service
shutdown
-r
now
````
systemctl start docker # This will be automatic once the IndieHosters unit-files are installed
systemctl list-units
docker ps
etcdctl ls
etcdctl help
````
systemctl enable etcd
systemctl start etcd
systemctl list-units
docker ps
etcdctl ls
etcdctl help
````
Now follow the
[
CoreOS-based instructions
](
deploying-a-server.md
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment