Skip to content

Commit 67ebd8c

Browse files
committed
refactor(seed-deis-registry): move to .service file
Moves seed-deis-registry to its own .service file, as it doesn't need to run on all hosts (and shouldn't be specified in user-data).
1 parent a1ce3cd commit 67ebd8c

2 files changed

Lines changed: 11 additions & 14 deletions

File tree

contrib/coreos/user-data

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -94,19 +94,5 @@ coreos:
9494
Type=oneshot
9595
ExecStart=/bin/sh -c 'docker pull deis/slugrunner:latest'
9696

97-
[Install]
98-
WantedBy=multi-user.target
99-
- name: seed-deis-registry.service
100-
command: start
101-
content: |
102-
[Unit]
103-
Description=Seed Deis Registry with Docker Images
104-
Requires=seed-docker-images.service deis-registry.service
105-
After=deis-registry.service
106-
107-
[Service]
108-
Type=oneshot
109-
ExecStart=/bin/sh -c "IFACE=$(netstat -nr | grep ^0.0.0.0 | awk '{print $8}') && HOST_IP=$(/bin/ifconfig $IFACE | awk '/inet /{print $2}') && docker pull deis/slugrunner:latest && docker tag deis/slugrunner $HOST_IP:5000/deis/slugrunner && docker push $HOST_IP:5000/deis/slugrunner"
110-
11197
[Install]
11298
WantedBy=multi-user.target
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
[Unit]
2+
Description=Seed Deis Registry with Docker Images
3+
Requires=seed-docker-images.service deis-registry.service
4+
After=deis-registry.service
5+
6+
[Service]
7+
Type=oneshot
8+
ExecStart=/bin/sh -c "IFACE=$(netstat -nr | grep ^0.0.0.0 | awk '{print $8}') && HOST_IP=$(/bin/ifconfig $IFACE | awk '/inet /{print $2}') && docker pull deis/slugrunner:latest && docker tag deis/slugrunner $HOST_IP:5000/deis/slugrunner && docker push $HOST_IP:5000/deis/slugrunner"
9+
10+
[Install]
11+
WantedBy=multi-user.target

0 commit comments

Comments
 (0)