Last active
August 10, 2017 01:47
-
-
Save kiuchikeisuke/d360c2b6487a1bb28e6c607e8ee2c329 to your computer and use it in GitHub Desktop.
簡単にopenstfの環境をMac上にゼロから構築する方法 ref: http://qiita.com/k_keisuke/items/77144fc47951a6adf697
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ brew install fleetctl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ fleetctl submit stf-notify-slack.service | |
$ fleetctl start stf-notify-slack |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
```text:hosts | |
172.17.8.101 stf.example.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
172.17.8.101 stf.example.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream stf_notify_slack { | |
# PLEASE UPDATE IP ADDRESS WITH APPROPRIATE ONE | |
server 172.17.8.102:3800 max_fails=0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream stf_app { | |
# PLEASE UPDATE IP ADDRESS WITH APPROPRIATE ONE | |
server 172.17.8.10{1|2|3}:3100 max_fails=0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream stf_app { | |
# PLEASE UPDATE IP ADDRESS WITH APPROPRIATE ONE | |
server 172.17.8.101:3100 max_fails=1; | |
server 172.17.8.102:3100 max_fails=1; | |
server 172.17.8.103:3100 max_fails=1; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
location ~ "^/d/2/([^/]+)/(?<port>[0-9]{5})/$" { | |
# PLEASE UPDATE IP ADDRESS WITH APPROPRIATE ONE | |
proxy_pass http://172.17.8.103:$port/; | |
proxy_http_version 1.1; | |
proxy_set_header Upgrade $http_upgrade; | |
proxy_set_header Connection $connection_upgrade; | |
proxy_set_header X-Forwarded-For $remote_addr; | |
proxy_set_header X-Real-IP $remote_addr; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
upstream stf_app { | |
# PLEASE UPDATE IP ADDRESS WITH APPROPRIATE ONE | |
server 172.17.8.103:3100 max_fails=0; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
UUID: e7757772-3030-44a3-ac14-00e53e9e32f8 | |
VendorId: 0x0fce (0FCE) | |
ProductId: 0x519e (519E) | |
Revision: 2.50 (0250) | |
Port: 2 | |
USB version/speed: 0/High | |
Manufacturer: Sony | |
Product: SOL23 | |
SerialNumber: CB5125LBYM | |
Address: p=0x519e;v=0x0fce;s=0x0001f3695ada4522;l=0x14200000 | |
Current State: Busy |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
stf auth-mock --port 3000 \ | |
- --app-url http://172.17.8.101/ | |
+ --app-url http://stf.example.org |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=STF Slack notifier | |
After=docker.service | |
BindsTo=docker.service | |
[Service] | |
EnvironmentFile=/etc/environment | |
TimeoutStartSec=0 | |
Restart=always | |
ExecStartPre=/usr/bin/docker pull openstf/stf:latest | |
ExecStartPre=-/usr/bin/docker kill %p | |
ExecStartPre=-/usr/bin/docker rm %p | |
ExecStart=/usr/bin/docker run --rm \ | |
--name %p \ | |
-e "SLACK_TOKEN=YOUR_SLACK_TOKEN_HERE" \ #ここ | |
-e "SLACK_CHANNEL=YOUR_SLACK_CHANNEL_HERE" \ #ここ | |
openstf/stf:latest \ | |
stf notify-slack \ | |
--connect-sub tcp://appside.stf.example.org:7150 | |
ExecStop=-/usr/bin/docker stop -t 10 %p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- vm_memory = 512 | |
+ vm_memory = 1024 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Start rethinkdb | |
- service rethinkdb start; | |
+ /etc/init.d/rethinkdb start; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v.customize ['usbfilter', 'add', '0', '--target', :id, '--name', $ANY_NAME, '--vendorid', $VENDOR_ID, '--productid', $PRODUCT_ID] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
v.customize ['usbfilter', 'add', '0', '--target', :id, '--name', 'Sony SOL23', '--vendorid', '0x0fce', '--productid', '0x519e'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment