Slide 25
Slide 25 text
$MPVE.FNPSZTUPSFʹଓͰ͖ͳ͍
w (,&͔Β.FNPSZTUPSFʢ3FEJTʣʹଓ͢ΔʹΫϥελ࡞࣌ʹ*1ΤΠϦΞεΛ༗ޮ
ʹ͠ͳ͚Ε͍͚ͳ͍͕ɺ$MPVE$PNQPTFSແޮʹͯ͠࡞ͬͯ͠·͏ɻ
ແޮͷ߹ΫϥελʹJQUBCMFTͷϧʔϧΛՃ͢Δඞཁ͕͋Δɻ
w $MPVE$PNQPTFS͕ཧ͍ͯ͠ΔLTΫϥελΛ͋·Γ৮Γͨ͘ͳ͔ͬͨͷͰɺ౿Έͱ
ͳΔ($&ΠϯελϯεΛཱͯͯղܾͨ͠ɻ
from redis import StrictRedis
from sshtunnel import SSHTunnelForwarder
with SSHTunnelForwarder((bastion_host, bastion_port),
ssh_username="airflow",
remote_bind_address=(redis_host, redis_port),
local_bind_address=("127.0.0.1", local_port),
allow_agent=False):
client = StrictRedis(host="127.0.0.1", port=local_port)
client.ping()