0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

プロキシが必要な社内環境にSentry Onpremiseを入れる

Posted at

外部接続が禁止されてる状態でのSentry onpremiseのインストール手順です。

プロキシを設定してSentry onpremiseのコードを取得します

$ export http_proxy=proxy.example.com:8080
$ export https_proxy=proxy.example.com:8081
$ git clone https://github.com/getsentry/onpremise.git
$ cd onpremise/

とりあえずインストールをお試し、通信失敗

$ ./install.sh
Checking minimum requirements...
中略
W: Failed to fetch http://deb.debian.org/debian/dists/stretch/InRelease  Could not connect to deb.debian.org:80 (151.101.230.133). - connect (111: Connection refused)

cron/Dockerfileでもproxyを使うように修正します

$ sed -i '3iENV http_proxy="http://proxy.example.com:8080"' cron/Dockerfile
$ ./install.sh
中略
You're all done! Run the following command to get Sentry running:
 docker-compose up -d

/etc/hostsの編集権限がない場合、内部urlをlocalhostに修正しておきます。

$ vi sentry/config.yml
system.internal-url-prefix: 'http://web:9000'
→system.internal-url-prefix: 'http://localhost:9000'

立ち上げます

$ docker-compose up -d
Starting sentry_onpremise_memcached_1            ... done
以下略

proxyを外して接続確認します

$ unset http_proxy
$ unset https_proxy
$ wget http://localhost:9000
--2020-09-16 20:37:49--  http://localhost:9000/
中略
Saving to: ‘index.html’
 
100%[====================================================================================>] 9,692       --.-K/s   in 0s     
 
2020-09-16 20:37:51 (285 MB/s) - ‘index.html’ saved [9692/9692]

おつかれさまでした。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?