Thread overview | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
|
January 10, 2018 !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
In the moment I don't have access, hopefully this is only temporal problem and the rescue team for fixing is already on the way... |
January 10, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Tschierschke | On Wednesday, 10 January 2018 at 10:10:22 UTC, Martin Tschierschke wrote: > In the moment I don't have access, hopefully this is only temporal problem and the rescue team for fixing is already on the way... Hehe, I'm working on adding more stability to our CI infrastructure, e.g. https://github.com/travis-ci/travis-build/pull/1282 https://github.com/dlang/installer/pull/214 https://github.com/dlang/installer/pull/291 DUB >= 1.6.0 comes with a couple of mirrors and should softly fallback to them: https://code-mirror.dlang.io http://code-mirror3.dlang.io code-mirror2 seems to be down too. I will have a look into that. |
January 10, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb Attachments:
| I am able to provide my VPS for mirroring too. Is there a tutorial how to do it?
On Wed, Jan 10, 2018 at 11:27 AM, Seb via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
> On Wednesday, 10 January 2018 at 10:10:22 UTC, Martin Tschierschke wrote:
>
>> In the moment I don't have access, hopefully this is only temporal problem and the rescue team for fixing is already on the way...
>>
>
> Hehe, I'm working on adding more stability to our CI infrastructure, e.g.
>
> https://github.com/travis-ci/travis-build/pull/1282 https://github.com/dlang/installer/pull/214 https://github.com/dlang/installer/pull/291
>
> DUB >= 1.6.0 comes with a couple of mirrors and should softly fallback to them:
>
> https://code-mirror.dlang.io
> http://code-mirror3.dlang.io
>
> code-mirror2 seems to be down too. I will have a look into that.
>
|
January 10, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Posted in reply to Daniel Kozak | On Wednesday, 10 January 2018 at 10:36:57 UTC, Daniel Kozak wrote: > I am able to provide my VPS for mirroring too. Is there a tutorial how to do it? The dub-registry binary can be started with `--mirror=https://code.dlang.org` Martin even an Ansible script for dub-mirror.dlang.io: https://github.com/dlang/ci/blob/master/ansible/roles/dub_registry_mirror/tasks/main.yml It boils down to these tasks: 1) git clone https://github.com/dlang/dub-registry 2) dub # <- maybe -b release 3) Install mongo and start sudo apt-get install mongodb && sudo systemctl enable mongodb && sudo systemctl start mongodb 4) Configure a systemd service Here's my systemd service: > /etc/systemd/system/dub-registry.service ----- [Unit] Description=DUB registry OnFailure=unit-status-mail@%n.service [Service] Environment="PORT=9001" ExecStart=/opt/projects/dub-registry/dub-registry --port 8005 --mirror=https://code.dlang.org --hostname=code-mirror2.dlang.org --vv WorkingDirectory=/opt/projects/dub-registry Restart=always RestartSec=30 User=dub-registry [Install] WantedBy=multi-user.target ------ > [Unit] Description=Unit Status Mailer Service After=network.target [Service] Type=simple ExecStart=/opt/bin/unit-status-mail.sh "%I" "Hostname: %H" "Machine ID: %m" "Boot ID: %b" ---- > /opt/bin/unit-status-mail.sh ---- #!/bin/bash MAILTO="root" MAILFROM="unit-status-mailer" UNIT=$1 EXTRA="" for e in "${@:2}"; do EXTRA+="$e"$'\n' done UNITSTATUS=$(systemctl status $UNIT) UNITLOG=$(journalctl -u $UNIT -r | head -n 100) sendmail $MAILTO <<EOF From:$MAILFROM To:$MAILTO Subject:Status of: $UNIT Status report for unit: $UNIT $EXTRA $UNITSTATUS $UNITLOG EOF echo -e "Status mail sent to: $MAILTO for unit: $UNIT" --- 5) Configure Nginx > /etc/nginx/sites-available/dub-mirror --- server { listen 80; listen [::]:80; server_name code-mirror2.dlang.io; location / { proxy_pass http://localhost:8005; } } --- 6) Configure Letsencrypt for SSL (optional) 7) Add yourself to this list: https://github.com/dlang/dub/blob/master/source/dub/dub.d#L64 Note that with a few tweaks it's possible to run the dub-registry on Heroku: https://github.com/dlang/dub-registry/pull/231 |
January 10, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb Attachments:
| Thank you :)
On Wed, Jan 10, 2018 at 11:53 AM, Seb via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
> On Wednesday, 10 January 2018 at 10:36:57 UTC, Daniel Kozak wrote:
>
>> I am able to provide my VPS for mirroring too. Is there a tutorial how to do it?
>>
>
> The dub-registry binary can be started with `--mirror=https://code.dlang.o
> rg`
> Martin even an Ansible script for dub-mirror.dlang.io:
>
> https://github.com/dlang/ci/blob/master/ansible/roles/dub_re gistry_mirror/tasks/main.yml
>
> It boils down to these tasks:
>
> 1) git clone https://github.com/dlang/dub-registry
> 2) dub # <- maybe -b release
> 3) Install mongo and start
>
> sudo apt-get install mongodb && sudo systemctl enable mongodb && sudo systemctl start mongodb
>
> 4) Configure a systemd service
>
> Here's my systemd service:
>
> /etc/systemd/system/dub-registry.service
>>
>
> -----
> [Unit]
> Description=DUB registry
> OnFailure=unit-status-mail@%n.service
>
> [Service]
> Environment="PORT=9001"
> ExecStart=/opt/projects/dub-registry/dub-registry --port 8005 --mirror=
> https://code.dlang.org --hostname=code-mirror2.dlang.org --vv
> WorkingDirectory=/opt/projects/dub-registry
> Restart=always
> RestartSec=30
> User=dub-registry
>
> [Install]
> WantedBy=multi-user.target
> ------
>
>
> [Unit]
>>
> Description=Unit Status Mailer Service
> After=network.target
>
> [Service]
> Type=simple
> ExecStart=/opt/bin/unit-status-mail.sh "%I" "Hostname: %H" "Machine ID:
> %m" "Boot ID: %b"
> ----
>
>
> /opt/bin/unit-status-mail.sh
>>
>
> ----
> #!/bin/bash
> MAILTO="root"
> MAILFROM="unit-status-mailer"
> UNIT=$1
>
> EXTRA=""
> for e in "${@:2}"; do
> EXTRA+="$e"$'\n'
> done
>
> UNITSTATUS=$(systemctl status $UNIT)
> UNITLOG=$(journalctl -u $UNIT -r | head -n 100)
>
> sendmail $MAILTO <<EOF
> From:$MAILFROM
> To:$MAILTO
> Subject:Status of: $UNIT
>
> Status report for unit: $UNIT
> $EXTRA
>
> $UNITSTATUS
>
> $UNITLOG
> EOF
>
> echo -e "Status mail sent to: $MAILTO for unit: $UNIT"
> ---
>
> 5) Configure Nginx
>
> /etc/nginx/sites-available/dub-mirror
>>
> ---
>
> server {
> listen 80;
> listen [::]:80;
> server_name code-mirror2.dlang.io;
>
> location / {
> proxy_pass http://localhost:8005;
> }
> }
> ---
>
> 6) Configure Letsencrypt for SSL (optional)
> 7) Add yourself to this list:
>
> https://github.com/dlang/dub/blob/master/source/dub/dub.d#L64
>
> Note that with a few tweaks it's possible to run the dub-registry on Heroku:
>
> https://github.com/dlang/dub-registry/pull/231
>
|
January 10, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Attachments:
| OK, I am unable to compile dub-registry :D, I have only 4GB free RAM and it seems it is not enought LOL
On Wed, Jan 10, 2018 at 12:03 PM, Daniel Kozak <kozzi11@gmail.com> wrote:
> Thank you :)
>
> On Wed, Jan 10, 2018 at 11:53 AM, Seb via Digitalmars-d < digitalmars-d@puremagic.com> wrote:
>
>> On Wednesday, 10 January 2018 at 10:36:57 UTC, Daniel Kozak wrote:
>>
>>> I am able to provide my VPS for mirroring too. Is there a tutorial how to do it?
>>>
>>
>> The dub-registry binary can be started with `--mirror=
>> https://code.dlang.org`
>> Martin even an Ansible script for dub-mirror.dlang.io:
>>
>> https://github.com/dlang/ci/blob/master/ansible/roles/dub_re gistry_mirror/tasks/main.yml
>>
>> It boils down to these tasks:
>>
>> 1) git clone https://github.com/dlang/dub-registry
>> 2) dub # <- maybe -b release
>> 3) Install mongo and start
>>
>> sudo apt-get install mongodb && sudo systemctl enable mongodb && sudo systemctl start mongodb
>>
>> 4) Configure a systemd service
>>
>> Here's my systemd service:
>>
>> /etc/systemd/system/dub-registry.service
>>>
>>
>> -----
>> [Unit]
>> Description=DUB registry
>> OnFailure=unit-status-mail@%n.service
>>
>> [Service]
>> Environment="PORT=9001"
>> ExecStart=/opt/projects/dub-registry/dub-registry --port 8005 --mirror=
>> https://code.dlang.org --hostname=code-mirror2.dlang.org --vv
>> WorkingDirectory=/opt/projects/dub-registry
>> Restart=always
>> RestartSec=30
>> User=dub-registry
>>
>> [Install]
>> WantedBy=multi-user.target
>> ------
>>
>>
>> [Unit]
>>>
>> Description=Unit Status Mailer Service
>> After=network.target
>>
>> [Service]
>> Type=simple
>> ExecStart=/opt/bin/unit-status-mail.sh "%I" "Hostname: %H" "Machine ID:
>> %m" "Boot ID: %b"
>> ----
>>
>>
>> /opt/bin/unit-status-mail.sh
>>>
>>
>> ----
>> #!/bin/bash
>> MAILTO="root"
>> MAILFROM="unit-status-mailer"
>> UNIT=$1
>>
>> EXTRA=""
>> for e in "${@:2}"; do
>> EXTRA+="$e"$'\n'
>> done
>>
>> UNITSTATUS=$(systemctl status $UNIT)
>> UNITLOG=$(journalctl -u $UNIT -r | head -n 100)
>>
>> sendmail $MAILTO <<EOF
>> From:$MAILFROM
>> To:$MAILTO
>> Subject:Status of: $UNIT
>>
>> Status report for unit: $UNIT
>> $EXTRA
>>
>> $UNITSTATUS
>>
>> $UNITLOG
>> EOF
>>
>> echo -e "Status mail sent to: $MAILTO for unit: $UNIT"
>> ---
>>
>> 5) Configure Nginx
>>
>> /etc/nginx/sites-available/dub-mirror
>>>
>> ---
>>
>> server {
>> listen 80;
>> listen [::]:80;
>> server_name code-mirror2.dlang.io;
>>
>> location / {
>> proxy_pass http://localhost:8005;
>> }
>> }
>> ---
>>
>> 6) Configure Letsencrypt for SSL (optional)
>> 7) Add yourself to this list:
>>
>> https://github.com/dlang/dub/blob/master/source/dub/dub.d#L64
>>
>> Note that with a few tweaks it's possible to run the dub-registry on Heroku:
>>
>> https://github.com/dlang/dub-registry/pull/231
>>
>
>
|
January 10, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Tschierschke | On Wednesday, 10 January 2018 at 10:10:22 UTC, Martin Tschierschke wrote: > In the moment I don't have access, hopefully this is only temporal problem and the rescue team for fixing is already on the way... Tips from the folks on Discord, for DUB outages: 1. If you have all required dependencies in your cache, and just want to avoid the network: dub --skip-registry=all Very useful on slow networks. However this won't help if you don't have the libraries in your cache. 2. If you wish to use a mirror dub --skip-registry=standard -v --registry=http://code-mirror.dlang.io 3. If you need to fetch packages and mirror are down too - git clone every repositery you need from GitHub - $ dub add-local in every of these repositery You might want to checkout older tags if you are not using the latest version of these repositeries. |
January 11, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Posted in reply to Guillaume Piolat | On Wednesday, 10 January 2018 at 23:25:16 UTC, Guillaume Piolat wrote:
> On Wednesday, 10 January 2018 at 10:10:22 UTC, Martin Tschierschke wrote:
>> In the moment I don't have access, hopefully this is only temporal problem and the rescue team for fixing is already on the way...
>
> Tips from the folks on Discord, for DUB outages:
>
> 1. If you have all required dependencies in your cache, and just want to avoid the network:
>
> dub --skip-registry=all
>
> Very useful on slow networks. However this won't help if you don't have the libraries in your cache.
>
>
> 2. If you wish to use a mirror
>
> dub --skip-registry=standard -v --registry=http://code-mirror.dlang.io
>
>
> 3. If you need to fetch packages and mirror are down too
>
> - git clone every repositery you need from GitHub
> - $ dub add-local in every of these repositery
> You might want to checkout older tags if you are not using the latest version of these repositeries.
Thank you for the hints, actually my problem was, that I wished to access the DUB docs.
And the strange thing was, that even the google cache tried to connect to code.dlang.org during delivery of the cached page, so that even looking on the cached google content took quite a long time before there was a timeout.
Therefore we should think about placing these kinds of infos about DUB not on the DUB server at code.dlang.org.
|
January 11, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Tschierschke | On Thursday, 11 January 2018 at 11:10:29 UTC, Martin Tschierschke wrote: > On Wednesday, 10 January 2018 at 23:25:16 UTC, Guillaume Piolat wrote: >> [...] > > Thank you for the hints, actually my problem was, that I wished to access the DUB docs. > And the strange thing was, that even the google cache tried to connect to code.dlang.org during delivery of the cached page, so that even looking on the cached google content took quite a long time before there was a timeout. > > Therefore we should think about placing these kinds of infos about DUB not on the DUB server at code.dlang.org. The docs are on GitHub too: git clone https://github.com/dlang/dub-registry Start with: dub Of course I agree that the dub documentation should find a different spot, actually everyone does. I think it's just lacking someone who does the hard work. |
January 11, 2018 Re: !Alert! code.dlang.org down | ||||
---|---|---|---|---|
| ||||
Posted in reply to Martin Tschierschke | On Thursday, 11 January 2018 at 11:10:29 UTC, Martin Tschierschke wrote: > Thank you for the hints, actually my problem was, that I wished to access the DUB docs. Me too. web.archive.org [1] helped me out. [1] https://web.archive.org/web/20171123172459/https://code.dlang.org/ |
Copyright © 1999-2021 by the D Language Foundation