View foo.sh
for pod in $(kubectl -n mdn-prod get pods | grep "web-" | cut -d" " -f 1)
do
kubectl -n mdn-prod exec -it ${pod} env | grep EMAIL_URL
done
View gist:88d586eb5db927476f8570a40e712d2e
cd /data/www/developer.mozilla.org/kuma/media/attachments
# https://stackoverflow.com/questions/19146240/find-and-delete-files-with-non-ascii-names
$ find . -print0 | perl -n0e 'chomp; print $_, "\n" if /[[:^ascii:][:cntrl:]]/'
./2012/07/09/2496/3691d8ced147536d8d9029f7484f7179/Перевод двух абзацев todo (требует небольшой редакции).txt
./2012/07/09/2534/0808ac3485bf0ee888174432c621c31d/حكي كبير.doc
./2012/07/09/2686/8458176af08addb96a4a0a08e9705886/安全那些事(内部版).zip
./2012/07/09/2716/747dc8c2175b0ebb59ef2169d06e7f76/9kopb_онега.jpg
./2012/07/09/2752/1f21356b3a6bdd861a63f7433c5cfe01/Quran_Makkah_Tarawih_1428H-084 İNŞİKAK.mp3
./2012/07/09/2753/9c872cd7d8e8c6e6b9b21b2fad73363b/Quran_Makkah_Tarawih_1428H-091 ŞEMS.mp3
./2012/07/09/2963/2cca507b15e00ebe23d23f5ed821274e/Ícone para Título.jpg
View route_scraper.py
# generate a yaml representation of active route53 traffic policies
# specify -j to get json output to process w/ jq
# the output from the route53 api calls is a bit messy, this script
# consolidates everything into a single struct.
import boto3
import collections
import json
import yaml
from optparse import OptionParser
View foo.md

RFC: Bedrock Jenkins Kubernetes modifications

Motivation

As we are moving our infrastructure to Kubernetes, the Bedrock Jenkins pipeline needs to be modified to support deploying to multiple Kubernetes clusters.

Specification

The Jenkins multi branch pipeline will initially be modified to deploy to our Virginia and Tokyo Kubernetes clusters.

View Dockerfile
from quay.io/mozmar/base:latest
ENV AWS_ACCESS_KEY_ID setme
ENV AWS_SECRET_ACCESS_KEY setme
ENV LOCAL_DIR /data
ENV REMOTE_DIR /backups/
ENV BUCKET s3://mdn-shared-backup
# set to either PUSH or PULL
ENV PUSH_OR_PULL PUSH
View SREupdate.md
layout title author excerpt_separator
post
MozMEAO SRE Status Report - 5/16/2017
Dave Parfitt
<!--more-->

Here's what happened on the MozMEAO SRE team from May 9th - May 16th.

View gist:cea197f9333768a3df20be8af33386b7
# Old index.php redirects
RewriteCond %{QUERY_STRING} ^title=http [NC]
RewriteRule ^index\.php$ / [L,NC]
RewriteCond %{QUERY_STRING} ^title=(.*)$ [NC]
RewriteRule ^index\.php$ %1 [R=301,L,NC]
# Links to FTP'ed code samples and examples
RewriteRule ^patches(.*) data/www/patches$1 [L]
View gist:2a3c647142d295225bc29bced71943bf
(mdntests) www-data@896ddb3c5f6b:/app$ clear && py.test -s --showlocals --tb=auto ./tests/redirects/test_redirects.py
Traceback (most recent call last):
File "/app/mdntests/bin/py.test", line 11, in <module>
sys.exit(main())
File "/app/mdntests/local/lib/python2.7/site-packages/_pytest/config.py", line 46, in main
config = _prepareconfig(args, plugins)
File "/app/mdntests/local/lib/python2.7/site-packages/_pytest/config.py", line 131, in _prepareconfig
pluginmanager=pluginmanager, args=args)
File "/app/mdntests/local/lib/python2.7/site-packages/_pytest/vendored_packages/pluggy.py", line 745, in __call__
return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)
View reader.py
import boto3
sqs = boto3.client('sqs', region_name="us-west-2",
aws_access_key_id='',
aws_secret_access_key=''
)
queue_url = ''
response = sqs.receive_message(
View mdn_volumes.yaml
kind: PersistentVolume
apiVersion: v1
metadata:
name: mdn-data-pv
annotations:
volume.beta.kubernetes.io/mount-options: "-o nfsvers=4.1,rsize=1048576,wsize=1048576,hard,timeo=600,retrans=2"
spec:
capacity:
storage: 10000Gi
accessModes: