$ twistd3 --nodaemon --pidfile= tftp --enable-reading --root-directory=$PWD
...
2017-04-05T14:08:49+0200 [-] RemoteOriginReadSession starting on 55337
2017-04-05T14:08:49+0200 [-] Starting protocol <tftp.bootstrap.RemoteOriginReadSession object at 0x7f0c16d9f2b0>
This file contains 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
#!/usr/bin/env bash | |
set -euo pipefail | |
# | |
# Capture the pre-push context. | |
# | |
# From githooks(5): | |
# | |
# Information about what is to be pushed is provided on the hook's standard |
This file contains 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
#!/usr/bin/env python3 | |
# | |
# To produce a report, run like so: | |
# | |
# $ ./this-script.py ui/src ui/tests | \ | |
# > cut -f 1 | sort | uniq -c | sort -k 2 | |
# | |
from pathlib import Path | |
import re |
This file contains 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
The files belonging to this database system will be owned by user "postgres". | |
This user must also own the server process. | |
The database cluster will be initialized with locale "en_US.utf8". | |
The default database encoding has accordingly been set to "UTF8". | |
The default text search configuration will be set to "english". | |
Data page checksums are disabled. | |
fixing permissions on existing directory /var/lib/postgresql/data ... ok |
This file contains 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
Sending build context to Docker daemon 19MB | |
Step 1/8 : FROM postgres:10.1 | |
---> 599272bf538f | |
Step 2/8 : ENV CARGO_HOME /cargo | |
---> Running in 1c642d69d946 | |
---> 36f826858a27 | |
Removing intermediate container 1c642d69d946 | |
Step 3/8 : ENV PATH $CARGO_HOME/bin:$PATH | |
---> Running in e7186288251c |
This file contains 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
import string | |
import requests | |
maas_url = "http://maas.server:5240/MAAS/" | |
api_desc = requests.get(maas_url + "api/2.0/describe/").json() | |
uri_templates = {h["uri"] for h in api_desc["handlers"]} |
Use the directory
output format because it works better with
incremental backups and is most flexible when restoring.
Do not compress because the overwhelming majority of the contents of the MAAS database is already compressed images. For a MAAS installation with one image the saving due to compression was only 1.7% but the dump took noticeably longer. With more images the ratio of already-compressed to not-compressed data goes up, and the savings will likely drop.
This file contains 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 contextlib import contextmanager | |
import time | |
import dns.resolver | |
from provisioningserver.utils.twisted import retries | |
def query_soa(zone): | |
for rdata in dns.resolver.query(zone, "SOA"): | |
return rdata # Return the first SOA found. |
NewerOlder