This file contains hidden or 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
from airflow import DAG | |
from airflow.contrib.sensors.gcs_sensor import GoogleCloudStoragePrefixSensor | |
from airflow.utils.dates import days_ago | |
from datetime import timedelta, datetime | |
dag = DAG( | |
'inference_pipeline', # DAGの名称 | |
default_args={ | |
'start_date': days_ago(1), # DAGがスケジューリングされる日付を指定 | |
'retries': 1, # タスク失敗時のリトライ回数の指定 |
This file contains hidden or 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
container_commands: | |
01start: | |
command: "sudo service telegraf start" | |
ignoreErrors: true |
This file contains hidden or 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
files: | |
"/etc/telegraf/telegraf.conf" | |
mode: "000666" | |
owner: root | |
group: root | |
content: | | |
[agent] | |
interval = "10s" | |
round_interval = true | |
metric_batch_size = 1000 |
This file contains hidden or 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
files: | |
"/etc/yum.repos.d/influxdb.repo" | |
mode: "00644" | |
owner: root | |
group: root | |
content: | | |
[influxdb] | |
name = InfluxDB Repository - RHEL $releasever | |
baseurl = https://repos.influxdata.com/rhel/7/$basearch/stable | |
enabled = 1 |
This file contains hidden or 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
# Telegraf Configuration | |
[agent] | |
## メトリクスの集計間隔 | |
## agentは他に設定があるけども特にこだわりなければこれを弄るだけでよいかな | |
interval = "10s" | |
############################################################################### | |
# OUTPUT PLUGINS # | |
############################################################################### |
This file contains hidden or 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
service Sample { | |
rpc SampleAPI(Request) returns (Response) { | |
option (google.api.http) = { | |
get : "/sample" | |
}; | |
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { | |
summary : "サンプル" | |
responses : { | |
key : "500" | |
value : { |
This file contains hidden or 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
service Sample { | |
rpc SampleAPI(Request) returns (Response) { | |
option (google.api.http) = { | |
get : "/sample" | |
}; | |
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { | |
summary : "サンプル" | |
responses : { | |
key : "500" | |
value : { |
This file contains hidden or 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
service Sample { | |
rpc SampleAPI(Request) returns (Response) { | |
option (google.api.http) = { | |
get: "/sample" | |
}; | |
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { | |
summary: "サンプル" | |
responses: { | |
key: "500"; | |
value : { |
This file contains hidden or 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
service Sample { | |
rpc SampleAPI(Request) returns (Response) { | |
option (google.api.http) = { | |
get : "/sample" | |
}; | |
option (grpc.gateway.protoc_gen_swagger.options.openapiv2_operation) = { | |
summary : "サンプル" | |
responses : { | |
key : "500"; | |
value : { |
This file contains hidden or 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
func main() { | |
flag.Parse() | |
defer glog.Flush() | |
ctx := context.Background() | |
opts := gateway.Options{ | |
Addr: ":8080", | |
GRPCServer: gateway.Endpoint{ | |
Network: *network, | |
Addr: *endpoint, |