rhq icon indicating copy to clipboard operation
rhq copied to clipboard

Tracking issue for custom hosts

Open ubnt-intrepid opened this issue 7 years ago • 2 comments

現状使用可能なホスティングサービスは GitHub, BitBucket および GitLab のみであり,それらへの URL がハードコーディングされている. これでは社内サーバや AWS などに設置されている GH Enterprise や GitLab などを扱うことが出来ないため,追加でホストを設定できる機能を追加する.

例:

# ~/.config/rhq/config.toml
[host."my.gitlab.host"]
http_address = "133.6.11.2:8888"
ssh_address = "133.6.11.2:2222"
$ rhq clone my.gitlab.host/organization1/repo1
# Equivalent to https://133.6.11.2:8888/organization1/repo1.git

ubnt-intrepid avatar Feb 23 '17 07:02 ubnt-intrepid

Configuration File Format

  • Candidate 1
    [[host]]
    path = "my.gitlab.host"
    address = "133.6.11.2"
    https_port = 8888
    ssh_port = 2222
    
  • Candidate 2
    [host."my.gitlab.host"]
    http_address = "133.6.11.2:8888"
    ssh_address = "133.6.11.2:2222"
    

ubnt-intrepid avatar Mar 05 '17 18:03 ubnt-intrepid

よく考えれば(よく考えなくても)、自前で設定項目を追加するより/etc/hosts~/.ssh/config の内容を読みに行ったほうが楽なのでその方針に切り換える。

Tasks

  • HTTP
    • [ ] getaddrinfo 経由でホスト名が与えられたときのアドレスを解決する
  • SSH
    • [ ] ~/.ssh/config のパーサ
    • [ ] ホスト名と該当する設定を読み込む
  • optional
    • [ ] ~/.rhqconfig 経由の設定項目の追加をサポート

ubnt-intrepid avatar Mar 26 '17 17:03 ubnt-intrepid