From: dklawren Date: Wed, 11 Mar 2020 20:18:50 +0000 (-0400) Subject: Bug 1621662 - Remove option for using Vagrant for BMO development and support Docker... X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=391a5300ddd67eca7ff7d52374b7272b00b49f5d;p=thirdparty%2Fbugzilla.git Bug 1621662 - Remove option for using Vagrant for BMO development and support Docker as primary method --- diff --git a/.dockerignore b/.dockerignore index 1574d719a..e96ef1f66 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,3 @@ -.vagrant .git MYMETA.* *.tar @@ -9,8 +8,6 @@ data localconfig pm_to_blib template_cache -Vagrantfile -vagrant_support \#*\# */\#*\# */*/\#*\# diff --git a/.gitignore b/.gitignore index 4f197c7ab..22feba92e 100644 --- a/.gitignore +++ b/.gitignore @@ -26,7 +26,6 @@ /blib /Bugzilla-*.*/ /local -.vagrant/ .vscode/perl-lang version.json __lbheartbeat__ diff --git a/.vscode/settings.json b/.vscode/settings.json index 4b7fdfbf9..ac028a853 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -9,7 +9,6 @@ }, "gitlens.blame.ignoreWhitespace": true, "files.exclude": { - ".vagrant": true, ".vscode/perl-lang": true, "template_cache": true }, @@ -18,5 +17,6 @@ }, "search.exclude": { "**/local": true - } + }, + "restructuredtext.confPath": "${workspaceFolder}/docs/en/rst/conf.py" } diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 4b8a6f867..fc7423f0f 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -19,55 +19,6 @@ "isDefault": true }, "problemMatcher": [] - }, - { - "label": "Vagrant: Start VM", - "type": "shell", - "command": "vagrant up", - "group": "none", - "problemMatcher": [] - }, - { - "label": "Vagrant: Suspend VM", - "type": "shell", - "command": "vagrant suspend", - "group": "none", - "problemMatcher": [] - }, - { - "label": "Vagrant: Start Web Server", - "type": "shell", - "command": "vagrant ssh web -c 'start_morbo'", - "group": "none", - "problemMatcher": [] - }, - { - "label": "Vagrant: Update Web Server", - "type": "shell", - "command": "vagrant rsync web", - "group": "build", - "problemMatcher": [] - }, - { - "label": "Vagrant: Force Update VM", - "type": "shell", - "command": "vagrant rsync && vagrant provision", - "group": "build", - "problemMatcher": [] - }, - { - "label": "Vagrant: Connect to Database", - "type": "shell", - "command": "vagrant ssh db -c 'mysql -u root -p bugs_bmo'", - "group": "none", - "problemMatcher": [] - }, - { - "label": "Vagrant: Update Perl Dependencies", - "type": "shell", - "command": "vagrant ssh web -c bmo-refresh-bundle", - "group": "none", - "problemMatcher": [] } ] } diff --git a/README.rst b/README.rst index ad591768b..f7b1f59e6 100644 --- a/README.rst +++ b/README.rst @@ -9,251 +9,26 @@ BMO is Mozilla's highly customized version of Bugzilla. .. contents:: .. - 1 Using Vagrant (For Development) - 1.1 Setup Vagrant VMs - 1.2 Making Changes and Seeing them - 1.3 Technical Details - 1.4 Perl Shell (re.pl, repl) - 2 Using Docker Compose (For Development) - 3 Docker Container - 3.1 Container Arguments - 3.2 Environmental Variables - 3.3 Persistent Data Volume - 4. Development Tips - 4.1 Testing Emails + 1. Using Docker Compose (For Development) + 2. Docker Container + 2.1 Container Arguments + 2.2 Environmental Variables + 2.3 Logging Configuration + 2.4 Persistent Data Volume + 3. Development Tips + 3.1 Testing Emails + 4. Administrative Tasks + 4.1 Generating cpanfile and cpanfile.snapshot files + 4.2 Generating a new mozillabteam/bmo-perl-slim base image If you want to contribute to BMO, you can fork this repo and get a local copy -of BMO running in a few minutes using Vagrant or Docker. - -Using Vagrant (For Development) -=============================== - -You will need to install the following software: - -* Vagrant 1.9.1 or later - -Doing this on OSX can be accomplished with homebrew: - -.. code-block:: bash - - brew cask install vagrant - -For Ubuntu 16.04, download the vagrant .dpkg directly from -https://vagrantup.com. The one that ships with Ubuntu is too old. - -Setup Vagrant VMs ------------------ - -From your BMO checkout run the following command: - -.. code-block:: bash - - vagrant up - -Vagrant might ask to install some missing plugins it detected, you should install these. -Depending on the speed of your computer and your Internet connection, this entire process -will take from a few minutes to much longer. - -If this fails, please file a bug `using this link `__. - -Otherwise, you should have a working BMO developer machine! - -To test it, you'll want to add an entry to /etc/hosts for bmo.test pointing -to 192.168.3.43. - -Then you must start the development webserver with ``vagrant ssh web -c 'start_morbo'``. - -After that, you should be able to visit http://bmo.test/ from your browser. -You can login as vagrant@bmo.test with the password "vagrant01!" (without -quotes). - -The development server (morbo) can also serve the site via HTTPS. - -Run `vagrant ssh web`, that should put you in the `/vagrant` directory. -While there run `openssl req -newkey rsa:2048 -sha256 -nodes -keyout bmo.test-key.pem -x509 -days 365 -out bmo.test.pem`. -Restart morbo and you should now be able to visit https://bmo.test. - -Vagrant and Windows Hyper-Vagrant ---------------------------------- - -Run PowerShell as Administrator - -- Press the Windows key. -- Type `powershell` in the search field. -- RIght click on the Powershell icon and choose `Run as administrator`. - -Enable hyperv support in Windows 10 - -.. code-block:: powershell - - Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V -All - -- You may need to reboot to finish the installation. - -Create NAT Switch with IP address of 192.168.3.1/24 - -.. code-block:: powershell - - New-VMSwitch -SwitchName “VagrantNAT” -SwitchType Internal - New-NetIPAddress -IPAddress 192.168.3.1 -PrefixLength 24 -InterfaceAlias “vEthernet (VagrantNAT)” - New-NetNAT -Name “VagrantNAT” -InternalIPInterfaceAddressPrefix 192.168.3.0/24 - -Install DHCP Server for Windows - -- http://www.dhcpserver.de/cms/download -- Download and extract the latest version of DHCP Server. -- Double-click ``dhcpwiz.exe`` to start the configuration utility. -- Select ``VagrantNAT`` that was created above as the network interface. -- Click Next and Skip configuring File and Name Service protocols. -- Set the IP-Pool range to be 100-254. -- Select the Advanced button to configure extra settings. -- Add ``8.8.8.8`` as a DNS Server. -- Add ``192.168.3.1`` as a Gateway and Select OK. -- Click Next. -- Make sure Overwrite existing file is checked and click Write INI file. -- Click Next and then Finish. -- Double-click ``dhcpsrv.exe`` to start the DHCP server. -- Continue to run as a system tray appliction. - -Install Vagrant for Windows - -- Install version 2.2.6 or higher due to bugs in older versions. -- https://www.vagrantup.com/downloads.html - -Install Git for Windows if not already installed. - -- https://git-scm.com/download/win - -Update hosts file in Windows to allow accessing the webserver by hostname. - -- Press the Windows key. -- Type `notepad` in the search field. -- Right click the Notepad icon and choose `Run as administrator`. -- From Notepad, open the following file: ``C:\Windows\System32\Drivers\etc\hosts``. -- Add ``192.168.3.43 bmo.test`` to the end of the file. -- Select File > Save to save your changes. - -Still in Powershell as Administrator, set an environment variable to use for Vagrantfile. -Then clone the BMO Github repo and start the Vagrant instances. - -.. code-block:: powershell - - [System.Environment]::SetEnvironmentVariable('HYPERV', '1') - git clone https://github.com/mozilla-bteam/bmo bmo - cd bmo - vagrant up --provider hyperv - -You will need to atart the mojo server to access BMO from the browser -using ``vagrant ssh web -c 'start_morbo'``. In your browser go to: ``http://bmo-web.vm``. - - -Making Changes and Seeing them ------------------------------- - -After editing files in the bmo directory, you will need to run - -.. code-block:: bash - - vagrant rsync web - -to see the changes applied to your vagrant VM. If the above command fails -or db is changed, do a full provision: - -.. code-block:: bash - - vagrant rsync && vagrant provision - -Testing Auth delegation ------------------------ - -For testing auth-delegation there is included an `scripts/auth-test-app` -script that runs a webserver and implements the auth delegation protocol. - -Provided you have `Mojolicious`_ installed: - -.. code-block:: bash - - perl auth-test-app daemon - -Then just browse to `localhost:3000`_ to test creating API keys. - -.. _`Mojolicious`: https://metacpan.org/pod/Mojolicious -.. _`localhost:3000`: http://localhost:3000 - -Technical Details ------------------ - -This Vagrant environment is a very complete but scaled-down version of -production BMO. It uses roughly the same RPMs (from CentOS 6, versus RHEL 6 -in production) and the same Perl dependencies (via -https://github.com/mozilla-bteam/carton-bundles). - -It includes a couple example products, some fake users, and some of BMO's -real groups. Email is disabled for all users; however, it is safe to enable -email as the box is configured to send all email to the 'vagrant' user on the -web vm. - -Most of the cron jobs and the jobqueue daemon are running. It is also -configured to use memcached. - -The push connector is not currently configured, nor is the Pulse publisher. - - -Perl Shell (re.pl, repl) ------------------------- - -Installed on the vagrant vm is also a program called re.pl. - -re.pl an interactive Perl shell (sometimes called a REPL (short for Read-Eval-Print-Loop)). -It loads Bugzilla.pm and you can call Bugzilla internal API methods from it, an example session is reproduced below: - -.. code-block:: plain - - re.pl - $ my $product = Bugzilla::Product->new({name => "Firefox"}); - Took 0.0262260437011719 seconds. - - $Bugzilla_Product1 = Bugzilla::Product=HASH(0x7e3c950); - - $ $product->name - Took 0.000483036041259766 seconds. - - Firefox - -It supports tab completion for file names, method names and so on. For more information see `Devel::REPL`_. - -You can use the 'p' command (provided by `Data::Printer`_) to inspect variables as well. - -.. code-block:: plain - - $ p @INC - [ - [0] ".", - [1] "lib", - [2] "local/lib/perl5/x86_64-linux-thread-multi", - [3] "local/lib/perl5", - [4] "/home/vagrant/perl/lib/perl5/x86_64-linux-thread-multi", - [5] "/home/vagrant/perl/lib/perl5", - [6] "/vagrant/local/lib/perl5/x86_64-linux-thread-multi", - [7] "/vagrant/local/lib/perl5", - [8] "/usr/local/lib64/perl5", - [9] "/usr/local/share/perl5", - [10] "/usr/lib64/perl5/vendor_perl", - [11] "/usr/share/perl5/vendor_perl", - [12] "/usr/lib64/perl5", - [13] "/usr/share/perl5", - [14] sub { ... } - ] - -.. _`Devel::REPL`: https://metacpan.org/pod/Devel::REPL -.. _`Data::Printer`: https://metacpan.org/pod/Data::Printer +of BMO running in a few minutes using Docker. Using Docker (For Development) ============================== -While not yet as featureful or complete as the vagrant setup, this repository now contains a -docker-compose file that will create a local Bugzilla for testing. +This repository contains a docker-compose file that will create a local Bugzilla for testing. To use docker-compose, ensure you have the latest Docker install for your environment (Linux, Windows, or Mac OS). If you are using Ubuntu, then you can read the next section @@ -263,7 +38,6 @@ to ensure that you have the correct docker setup. docker-compose up --build - Then, you must configure your browser to use localhost and port 1080 as an HTTP proxy. For setting a proxy in Firefox, see `Firefox Connection Settings`_. The procedure should be similar for other browsers. @@ -271,7 +45,7 @@ The procedure should be similar for other browsers. .. _`Firefox Connection Settings`: https://support.mozilla.org/en-US/kb/connection-settings-firefox After that, you should be able to visit http://bmo.test/ from your browser. -You can login as vagrant@bmo.test with the password "vagrant01!" (without +You can login as admin@bmo.test with the password "password01!" (without quotes). If you want to update the code running in the web container, you do not need to restart everything. @@ -294,7 +68,7 @@ Command+Shift+B on macOS. An `extension bundle`_ for VS Code is also available. Ensuring your Docker setup on Ubuntu 16.04 -========================================== +------------------------------------------ On Ubuntu, Docker can be installed using apt-get. After installing, you need to do run these commands to ensure that it has installed fine: @@ -535,54 +309,57 @@ This container expects /app/data to be a persistent, shared, writable directory owned by uid 10001. This must be a shared (NFS/EFS/etc) volume between all nodes. + Development Tips ================ Testing Emails -------------- -With vagrant have two options to test emails sent by a local Bugzilla instance. You can configure -which setting you want to use by going to http://bmo.test/editparams.cgi?section=mta and -changing the mail_delivery_method to either 'Test' or 'Sendmail'. Afterwards restart BMO with -``vagrant reload``. With docker, only the default 'Test' option is supported. +Configure your MTA setting you want to use by going to http://bmo.test/editparams.cgi?section=mta +and changing the mail_delivery_method to 'Test'. With this option, all mail will be appended to a +``data/mailer.testfile``. To see the emails being sent: -'Test' option (Default for Docker) ----------------------------------- +.. code-block:: bash -With this option, all mail will be appended to a ``mailer.testfile``. + docker-compose run bmo.test cat /app/data/mailer.testfile -- Using docker, run ``docker-compose run bmo.test cat /app/data/mailer.testfile``. -- Using vagrant, run ``vagrant ssh web`` and then navigate to ``/vagrant/data/mailer.testfile``. +Testing Auth delegation +----------------------- -'Sendmail' option (Default for Vagrant) ---------------------------------------- +For testing auth-delegation there is included an `scripts/auth-test-app` +script that runs a webserver and implements the auth delegation protocol. -This option is useful if you want to preview email using a real mail client. -An imap server is running on bmo.test on port 143 and you can connect to it with -the following settings: +Provided you have `Mojolicious`_ installed: -- host: bmo.test -- port: 143 -- encryption: No SSL, Plaintext password -- username: vagrant -- password: anything +.. code-block:: bash + + perl auth-test-app daemon + +Then just browse to `localhost:3000`_ to test creating API keys. + +.. _`Mojolicious`: https://metacpan.org/pod/Mojolicious +.. _`localhost:3000`: http://localhost:3000 + +Technical Details +----------------- -All email that bmo sends will go to the vagrant user, so there is no need to login with -multiple imap accounts. +This Docker environment is a very scaled-down version of production BMO. +It uses roughly the same Perl dependencies as production. It is also +configured to use memcached. The push connector is running but is not +currently configured, nor is the Phabricator feed daemon. -`Thunderbird's`_ wizard to add a new "Existing Mail Account" doesn't work with bmo-web. It -fails because it wants to create a mail account with both incoming mail (IMAP) and outgoing -mail (SMTP, which bmo.test doesn't provide). To work around this, using a regular email -account to first setup, then modify the settings of that account: Right Click the account in -the left side bar > Settings > Server Settings. Update the server settings to match those -listed above. Afterwards, you may update the account name to be vagrant@bmo.test. Thunderbird -will now pull email from BMO. You can try it out by commenting on a bug. +It includes a couple example products, some fake users, and some of BMO's +real groups. Email is disabled for all users; however, it is safe to enable +email as the box is configured to send all email to the 'admin' user on the +web vm. -.. _`Thunderbird's`: https://www.mozilla.org/en-US/thunderbird/ +Administrative Tasks +==================== Generating cpanfile and cpanfile.snapshot files -=============================================== +----------------------------------------------- .. code-block:: bash @@ -590,7 +367,7 @@ Generating cpanfile and cpanfile.snapshot files docker run -it -v "$(pwd):/app/result" bmo-cpanfile cp cpanfile cpanfile.snapshot /app/result Generating a new mozillabteam/bmo-perl-slim base image -====================================================== +------------------------------------------------------ The mozillabteam/bmo-perl-slim image is stored in the Mozilla B-Team Docker Hub repository. It contains just the Perl dependencies in ``/app/local`` @@ -607,9 +384,9 @@ format with X being the current iteration value. For example, ``20191209.1``. .. code-block:: bash - docker build -t mozillabteam/bmo-perl-slim: -f Dockerfile.bmo-slim . - docker login - docker push mozillabteam/bmo-perl-slim: + docker build -t mozillabteam/bmo-perl-slim: -f Dockerfile.bmo-slim . + docker login + docker push mozillabteam/bmo-perl-slim: After pushing to Docker Hub, you will need to update ``Dockerfile`` to include the new built image with correct date. Create a PR, review and commit the new change. diff --git a/Vagrantfile b/Vagrantfile deleted file mode 100644 index d45d31adb..000000000 --- a/Vagrantfile +++ /dev/null @@ -1,160 +0,0 @@ -# vim: set ft=ruby sw=2 ts=2: -# -*- mode: ruby -*- - -DB_IP = ENV.fetch "BMO_DB_IP", '192.168.3.42' -WEB_IP = ENV.fetch "BMO_WEB_IP", '192.168.3.43' -GATEWAY_IP = ENV.fetch "GATEWAY_IP", '192.168.3.1' -DNS_IP = ENV.fetch "DNS_IP", '8.8.8.8' -DB_HOSTNAME = ENV.fetch "BMO_DB_HOST", 'bmo-db.vm' -WEB_HOSTNAME = ENV.fetch "BMO_WEB_HOST", 'bmo-web.vm' -DB_PORT = ENV.fetch "BMO_DB_PORT", 2221 -WEB_PORT = ENV.fetch "BMO_WEB_PORT", 2222 -DB_MEM = ENV.fetch "BMO_DB_MEM", 512 -WEB_MEM = ENV.fetch "BMO_WEB_MEM", 2048 -DB_CPU = ENV.fetch "BMO_DB_CPU", 1 -WEB_CPU = ENV.fetch "BMO_WEB_CPU", 2 -HYPERV = ENV.fetch "HYPERV", 0 - -# this is for centos 6 / el 6 -VENDOR_BUNDLE_URL = ENV.fetch "BMO_BUNDLE_URL", - 'https://moz-devservices-bmocartons.s3.amazonaws.com/bmo/vendor.tar.gz' - -RSYNC_ARGS = [ - '--verbose', - '--archive', - '-z', - '--copy-links', - '--exclude=local/', - '--exclude=data/', - '--exclude=logs/', - '--exclude=template_cache/', - '--exclude=localconfig', - '--include=.git/' -] - -# This is a little weird, but we need to update -require 'json' - -Dir.glob(".vagrant/machines/*/*/synced_folders").each do |filename| - synced_folders = JSON.parse(IO.read(filename)) - synced_folder = synced_folders["rsync"]["/vagrant"] - dirty = false - %w( rsync__args args ).each do |key| - if RSYNC_ARGS != synced_folder[key] - dirty = true - synced_folder[key] = RSYNC_ARGS - end - if dirty - puts "Updating #{filename} because it has old rsync args" - IO.write(filename + ".new", JSON.unparse(synced_folders)) - end - end -end - - -# All Vagrant configuration is done below. The '2' in Vagrant.configure -# configures the configuration version (we support older styles for -# backwards compatibility). Please don't change it unless you know what -# you're doing. -Vagrant.configure('2') do |config| - # The most common configuration options are documented and commented below. - # For a complete reference, please see the online documentation at - # https://docs.vagrantup.com. - - config.vm.provision 'main', type: 'ansible_local', run: 'always' do |ansible| - ansible.playbook = 'vagrant_support/playbook.yml' - ansible.extra_vars = { - WEB_IP: WEB_IP, - DB_IP: DB_IP, - WEB_HOSTNAME: WEB_HOSTNAME, - DB_HOSTNAME: DB_HOSTNAME, - VENDOR_BUNDLE_URL: VENDOR_BUNDLE_URL, - GATEWAY_IP: GATEWAY_IP, - DNS_IP: DNS_IP, - HYPERV: HYPERV - } - end - - if ARGV.include? '--provision-with' - config.vm.provision 'update', type: 'ansible_local', run: 'never' do |update| - update.playbook = 'vagrant_support/update.yml' - end - end - - config.vm.define 'db' do |db| - db.vm.box = 'centos/6' - - db.vm.hostname = DB_HOSTNAME - db.vm.network 'private_network', ip: DB_IP - db.vm.network 'forwarded_port', - id: 'ssh', - host: DB_PORT, - guest: 22, - auto_correct: true - - db.vm.synced_folder '.', '/vagrant', type: 'rsync', rsync__args: RSYNC_ARGS - - db.vm.provider "virtualbox" do |v| - v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - v.customize ["modifyvm", :id, "--natdnsproxy1", "on"] - v.memory = DB_MEM - v.cpus = DB_CPU - end - - db.vm.provider 'parallels' do |prl, override| - override.vm.box = 'parallels/centos-6.8' - prl.memory = DB_MEM - prl.cpus = DB_CPU - end - - db.vm.provider 'vmware_fusion' do |v| - v.vmx['memsize'] = DB_MEM - v.vmx['numvcpus'] = DB_CPU - v.linked_clone = false - end - - db.vm.provider "hyperv" do |hv| - db.vm.network "private_network", bridge: "VagrantNAT" - end - end - - config.vm.define 'web', primary: true do |web| - # Every Vagrant development environment requires a box. You can search for - # boxes at https://atlas.hashicorp.com/search. - web.vm.box = 'centos/6' - web.vm.hostname = WEB_HOSTNAME - - # Create a private network, which allows host-only access to the machine - # using a specific IP. - web.vm.network 'private_network', ip: WEB_IP - web.vm.network 'forwarded_port', - id: 'ssh', - host: WEB_PORT, - guest: 22, - auto_correct: true - - web.vm.synced_folder '.', '/vagrant', type: 'rsync', rsync__args: RSYNC_ARGS - - web.vm.provider 'virtualbox' do |v| - v.memory = WEB_MEM - v.cpus = WEB_CPU - v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"] - v.customize ["modifyvm", :id, "--natdnsproxy1", "on"] - end - - web.vm.provider 'parallels' do |prl, override| - override.vm.box = 'parallels/centos-6.8' - prl.memory = WEB_MEM - prl.cpus = WEB_CPU - end - - web.vm.provider 'vmware_fusion' do |v| - v.vmx['memsize'] = WEB_MEM - v.vmx['numvcpus'] = WEB_CPU - end - - web.vm.provider "hyperv" do |hv| - web.vm.network "private_network", bridge: "VagrantNAT" - end - end -end diff --git a/conf/checksetup_answers.txt b/conf/checksetup_answers.txt index 2a9d6dc32..b83f6d0ba 100644 --- a/conf/checksetup_answers.txt +++ b/conf/checksetup_answers.txt @@ -1,6 +1,6 @@ -$answer{'ADMIN_EMAIL'} = 'vagrant@bmo.test'; +$answer{'ADMIN_EMAIL'} = 'admin@bmo.test'; $answer{'ADMIN_OK'} = 'Y'; -$answer{'ADMIN_PASSWORD'} = 'vagrant01!'; +$answer{'ADMIN_PASSWORD'} = 'password01!'; $answer{'passwdqc_min'} = '8, 8, 8, 8, 8'; $answer{'ADMIN_REALNAME'} = 'Vagrant User'; $answer{'NO_PAUSE'} = 1; diff --git a/conf/log4perl-vagrant.conf b/conf/log4perl-vagrant.conf deleted file mode 100644 index d9c3e2753..000000000 --- a/conf/log4perl-vagrant.conf +++ /dev/null @@ -1,24 +0,0 @@ -log4perl.rootLogger = DEBUG, TextFile, JSONFile, Screen - -log4perl.appender.TextFile = Log::Log4perl::Appender::File -log4perl.appender.TextFile.layout = Log::Log4perl::Layout::PatternLayout -log4perl.appender.TextFile.filename = sub { Bugzilla::Logging->logfile("bugzilla.log") } -log4perl.appender.TextFile.layout.ConversionPattern = %-5.5p [%d] [%c] %m{chomp} at %F line %L (%M)%n -log4perl.appender.TextFile.create_at_logtime = true -log4perl.appender.TextFile.owner = vagrant -log4perl.appender.TextFile.group = apache - -log4perl.appender.JSONFile = Log::Log4perl::Appender::File -log4perl.appender.JSONFile.layout = Log::Log4perl::Layout::Mozilla -log4perl.appender.JSONFile.filename = sub { Bugzilla::Logging->logfile("bugzilla-json.log") } -log4perl.appender.JSONFile.mode = append -log4perl.appender.JSONFile.create_at_logtime = true -log4perl.appender.JSONFile.owner = vagrant -log4perl.appender.JSONFile.group = apache - -log4perl.filter.LOG_TO_STDERR = sub { not $ENV{LOG4PERL_STDERR_DISABLE} } -log4perl.appender.Screen = Log::Log4perl::Appender::Screen -log4perl.appender.Screen.Filter = LOG_TO_STDERR -log4perl.appender.Screen.stderr = 1 -log4perl.appender.Screen.layout = Log::Log4perl::Layout::PatternLayout -log4perl.appender.Screen.layout.ConversionPattern = %d %6p | %c | %m{chomp}%n diff --git a/scripts/entrypoint.pl b/scripts/entrypoint.pl index 499bbd4c3..dead761a2 100755 --- a/scripts/entrypoint.pl +++ b/scripts/entrypoint.pl @@ -122,7 +122,7 @@ sub cmd_dev_httpd { run( 'perl', 'scripts/generate_bmo_data.pl', '--param' => 'use_mailer_queue=0', - 'vagrant@bmo.test' + 'admin@bmo.test' ); } diff --git a/scripts/start_morbo b/scripts/start_morbo index b741214e0..a598c3434 100755 --- a/scripts/start_morbo +++ b/scripts/start_morbo @@ -35,7 +35,7 @@ if ($MOJO_LISTEN && -f $cert_file && -f $key_file) { push @PERL5LIB, catdir($BUGZILLA_DIR, qw(local lib perl5)); unshift @PATH, catdir($BUGZILLA_DIR, qw(local bin)); $BUGZILLA_ALLOW_INSECURE_HTTP = 1; -$MOJO_REVERSE_PROXY = 1 if $BUGZILLA_DIR ne '/vagrant'; +$MOJO_REVERSE_PROXY = 1; $LOG4PERL_CONFIG_FILE //= 'log4perl-morbo.conf'; my @files diff --git a/vagrant_support/apache.j2 b/vagrant_support/apache.j2 deleted file mode 100644 index 3135d8c25..000000000 --- a/vagrant_support/apache.j2 +++ /dev/null @@ -1,25 +0,0 @@ -PerlSwitches -wT -PerlSetEnv USE_NYTPROF 0 -PerlSetEnv BUGZILLA_UNSAFE_AUTH_DELEGATION 1 -PerlSetEnv LOG4PERL_CONFIG_FILE log4perl-vagrant.conf -PerlSetEnv LOG4PERL_STDERR_DISABLE 1 -PerlConfigRequire /vagrant/mod_perl.pl - - - StartServers 2 - MinSpareServers 2 - MaxSpareServers 2 - MaxClients 200 - MaxRequestsPerChild 4500 - - - - KeepAlive Off - DocumentRoot "/vagrant" - - DirectoryIndex index.cgi - Options Indexes FollowSymLinks ExecCGI - AllowOverride None - Allow from all - - diff --git a/vagrant_support/apache.yml b/vagrant_support/apache.yml deleted file mode 100644 index 90cfa9c6b..000000000 --- a/vagrant_support/apache.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -- name: configure httpd - template: - src: apache.j2 - dest: /etc/httpd/conf.d/bugzilla.conf - mode: 0644 - when: LAZY == 0 - -- name: disable httpd - service: name=httpd enabled=no - when: LAZY == 0 - -- name: create logs directory - file: path=/vagrant/logs state=directory owner=vagrant group=apache mode=770 - -- name: ensure bugzilla.log has right permissions - file: path=/vagrant/logs/bugzilla.log state=touch owner=vagrant group=apache mode=0660 - -- name: ensure bugzilla-json.log has right permissions - file: path=/vagrant/logs/bugzilla-json.log state=touch owner=vagrant group=apache mode=0660 - -- name: stop httpd - service: name=httpd state=stopped diff --git a/vagrant_support/bashrc b/vagrant_support/bashrc deleted file mode 100644 index 72290966a..000000000 --- a/vagrant_support/bashrc +++ /dev/null @@ -1,15 +0,0 @@ -# .bashrc - -# Source global definitions -if [ -f /etc/bashrc ]; then - . /etc/bashrc -fi - -# User specific aliases and functions -PS1='\[\e[0;31m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] $ ' - -export PERL5LIB=/vagrant/local/lib/perl5 -export PATH=/vagrant/local/bin:$PATH -export MOJO_LISTEN="http://*:80" - -cd /vagrant diff --git a/vagrant_support/bmo-checksetup.j2 b/vagrant_support/bmo-checksetup.j2 deleted file mode 100755 index a2695d0cf..000000000 --- a/vagrant_support/bmo-checksetup.j2 +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -cd /vagrant - -if [[ ! -f ~/localconfig || ! -f /data/params ]]; then - perl checksetup.pl "$@" /home/vagrant/checksetup_answers.txt - perl checksetup.pl "$@" /home/vagrant/checksetup_answers.txt -else - cp ~/localconfig /vagrant - perl checksetup.pl "$@" < /dev/null - cp /vagrant/localconfig ~/ -fi diff --git a/vagrant_support/bmo-generate-data.j2 b/vagrant_support/bmo-generate-data.j2 deleted file mode 100644 index 6ad9303d6..000000000 --- a/vagrant_support/bmo-generate-data.j2 +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -cd /vagrant -perl scripts/generate_bmo_data.pl 'vagrant@{{ WEB_HOSTNAME }}' -perl scripts/update_params.pl 'mail_delivery_method' 'Sendmail' diff --git a/vagrant_support/bmo-refresh-bundle.j2 b/vagrant_support/bmo-refresh-bundle.j2 deleted file mode 100755 index 6981d9eb7..000000000 --- a/vagrant_support/bmo-refresh-bundle.j2 +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -curl -q -L '{{VENDOR_BUNDLE_URL}}' | sudo tar -zxf - -C /opt diff --git a/vagrant_support/bugzilla-push b/vagrant_support/bugzilla-push deleted file mode 100755 index 30e08b0de..000000000 --- a/vagrant_support/bugzilla-push +++ /dev/null @@ -1,112 +0,0 @@ -#!/bin/bash -# -# bugzilla-push This starts, stops, and restarts the Bugzilla push -# daemon, which manages syncronising bugzilla.mozilla.org and -# third party Bugzilla installs. -# -# chkconfig: 345 85 15 -# description: Bugzilla push daemon -# -### BEGIN INIT INFO -# Provides: bugzilla-push -# Required-Start: $local_fs $syslog MTA mysqld -# Required-Stop: $local_fs $syslog MTA mysqld -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Start and stop the Bugzilla push daemon. -# Description: The Bugzilla push daemon (bugzilla-pushd.pl) -# -# -# -### END INIT INFO - -NAME=`basename $0` - -################# -# Configuration # -################# - -# This should be the path to your Bugzilla -BUGZILLA=/data/www/bugzilla.mozilla.org -# Who owns the Bugzilla directory and files? -USER=root - -# If you want to pass any options to the daemon (like -d for debugging) -# specify it here. -OPTIONS="" - -# You can also override the configuration by creating a -# /etc/sysconfig/bugzilla-queue file so that you don't -# have to edit this script. -if [ -r /etc/sysconfig/$NAME ]; then - . /etc/sysconfig/$NAME -fi - -########## -# Script # -########## - -RETVAL=0 -BIN=$BUGZILLA/extensions/Push/bin/bugzilla-pushd.pl -PIDFILE=/var/run/$NAME.pid - -# Source function library. -. /etc/rc.d/init.d/functions - -usage () -{ - echo "Usage: service $NAME {start|stop|status|restart|condrestart}" - RETVAL=1 -} - - -start () -{ - if [ -f "$PIDFILE" ]; then - checkpid `cat $PIDFILE` && return 0 - fi - echo -n "Starting $NAME: " - touch $PIDFILE - chown $USER $PIDFILE - daemon --user=$USER "cd $BUGZILLA && $BIN ${OPTIONS} -p '$PIDFILE' -n $NAME start > /dev/null" - ret=$? - [ $ret -eq "0" ] && touch /var/lock/subsys/$NAME - echo - return $ret -} - -stop () -{ - [ -f /var/lock/subsys/$NAME ] || return 0 - echo -n "Killing $NAME: " - killproc $NAME - echo - rm -f /var/lock/subsys/$NAME -} - -restart () -{ - stop - start -} - -condrestart () -{ - [ -e /var/lock/subsys/$NAME ] && restart || return 0 -} - -status () -{ - cd $BUGZILLA && $BIN -p $PIDFILE -n $NAME check -} - -case "$1" in - start) start; RETVAL=$? ;; - stop) stop; RETVAL=$? ;; - status) status; RETVAL=$?;; - restart) restart; RETVAL=$? ;; - condrestart) condrestart; RETVAL=$? ;; - *) usage ; RETVAL=2 ;; -esac - -exit $RETVAL diff --git a/vagrant_support/checksetup.yml b/vagrant_support/checksetup.yml deleted file mode 100644 index 1cfd8c8cf..000000000 --- a/vagrant_support/checksetup.yml +++ /dev/null @@ -1,56 +0,0 @@ ---- -- name: bmo checksetup script - template: - src: bmo-checksetup.j2 - dest: /usr/local/bin/bmo-checksetup - mode: 0755 - when: LAZY == 0 - -- name: bmo generate data script - template: - src: bmo-generate-data.j2 - dest: /usr/local/bin/bmo-generate-data - mode: 0755 - when: LAZY == 0 - -- name: bmo checksetup answers - template: - src: checksetup_answers.j2 - dest: /home/vagrant/checksetup_answers.txt - owner: vagrant - group: vagrant - mode: 0644 - when: LAZY == 0 - -- name: fix owner of /vagrant/template_cache - file: path=/vagrant/template_cache state=directory owner=vagrant group=apache recurse=yes - -- name: fix owner of /data - file: path=/data state=directory owner=vagrant group=apache recurse=yes - -- name: Force Mojolicious (FIXME) - cpanm: - executable: /usr/local/bin/cpanm - locallib: /vagrant/local - name: https://cpan.metacpan.org/authors/id/S/SR/SRI/Mojolicious-8.23.tar.gz - notest: True - -- name: Update a few CPAN Modules (FIXME) - cpanm: - executable: /usr/local/bin/cpanm - locallib: /vagrant/local - name: "{{ item.name }}" - version: "{{ item.version }}" - notest: True - with_items: - - { name: 'Mojolicious::Plugin::OAuth2::Server', version: '0.44' } - - { name: 'Type::Tiny', version: '1.004004' } - -- name: run checksetup - become: false - shell: sg apache -c '/usr/local/bin/bmo-checksetup --no-templates' - -- name: generate data - become: false - shell: sg apache -c '/usr/local/bin/bmo-generate-data' - diff --git a/vagrant_support/checksetup_answers.j2 b/vagrant_support/checksetup_answers.j2 deleted file mode 100644 index 0322ad129..000000000 --- a/vagrant_support/checksetup_answers.j2 +++ /dev/null @@ -1,43 +0,0 @@ -$answer{'ADMIN_EMAIL'} = 'vagrant@{{ WEB_HOSTNAME }}'; -$answer{'ADMIN_OK'} = 'Y'; -$answer{'ADMIN_PASSWORD'} = 'vagrant01!'; -$answer{'passwdqc_min'} = '8, 8, 8, 8, 8'; -$answer{'ADMIN_REALNAME'} = 'Vagrant User'; -$answer{'NO_PAUSE'} = 1; -$answer{'size_limit'} = 750000; -$answer{'bugzilla_version'} = '1'; -$answer{'canonical_urlbase'} = "http://{{WEB_HOSTNAME}}/"; -$answer{'create_htaccess'} = '1'; -$answer{'db_check'} = 1; -$answer{'db_driver'} = 'mysql'; -$answer{'db_host'} = '{{DB_IP}}'; -$answer{'db_name'} = 'bugs_bmo'; -$answer{'db_pass'} = 'bugs'; -$answer{'db_port'} = 0; -$answer{'db_sock'} = ''; -$answer{'db_user'} = 'bugs'; -$answer{'diffpath'} = '/usr/bin'; -$answer{'index_html'} = 0; -$answer{'interdiffbin'} = '/usr/bin/interdiff'; -$answer{'user_info_class'} = 'GitHubAuth,CGI'; -$answer{'user_verify_class'} = 'GitHubAuth,DB'; -$answer{'urlbase'} = "http://{{WEB_HOSTNAME}}/"; -$answer{'memcached_namespace'} = 'bmo:'; -$answer{'memcached_servers'} = '127.0.0.1:11211'; -$answer{'mail_delivery_method'} = 'Sendmail'; -$answer{'use_mailer_queue'} = 1; -$answer{'useclassification'} = 1; -$answer{'usebugaliases'} = 1; -$answer{'upgrade_notification'} = 0; -$answer{'usestatuswhiteboard'} = 1; -$answer{'usetargetmilestone'} = 1; -$answer{'webdotbase'} = '/usr/bin/dot'; -$answer{'auth_delegation'} = 1; -$answer{'insidergroup'} = 'admin'; -$answer{'default_bug_type'} = '--'; -$answer{'defaultpriority'} = '--'; -$answer{'defaultseverity'} = 'normal'; -$answer{'skin'} = 'Mozilla'; -$answer{'docs_urlbase'} = 'https://bmo.readthedocs.io/en/latest/'; -$answer{'ses_username'} = 'ses'; -$answer{'ses_password'} = 'secret'; diff --git a/vagrant_support/cron.yml b/vagrant_support/cron.yml deleted file mode 100644 index c61ffea9e..000000000 --- a/vagrant_support/cron.yml +++ /dev/null @@ -1,51 +0,0 @@ -- name: set cron mailto - cron: - env: yes - name: MAILTO - value: vagrant@localhost - -- name: cron remove-idle-group-members - cron: - name: cron remove-idle-group-members - hour: 7 - minute: 0 - job: 'cd /vagrant; ./scripts/remove_idle_group_members.pl' - -- name: cron collectstats - cron: - name: cron collectstats - hour: 7 - minute: 0 - job: 'cd /vagrant; ./collectstats.pl' - - -- name: cron whine - cron: - name: cron whine - user: apache - minute: '*/15' - job: 'cd /vagrant; ./whine.pl' - -- name: cron clean-bug-user-last-visit - cron: - name: cron clean-bug-user-last-visit - user: apache - hour: 7 - minute: 0 - job: 'cd /vagrant; ./clean-bug-user-last-visit.pl' - -- name: request nagger - cron: - name: request nagger - user: apache - hour: 7 - minute: 30 - job: 'cd /vagrant; ./extensions/RequestNagger/bin/send-request-nags.pl' - -- name: userprofile - cron: - name: userprofile - user: apache - hour: 7 - minute: 30 - job: 'cd /vagrant; ./extensions/UserProfile/bin/update.pl' diff --git a/vagrant_support/devtools.yml b/vagrant_support/devtools.yml deleted file mode 100644 index c3829fca6..000000000 --- a/vagrant_support/devtools.yml +++ /dev/null @@ -1,35 +0,0 @@ ---- -- name: copy bashrc - copy: src=bashrc dest=/home/vagrant/.bashrc mode=0644 - -- cpanm: name=Devel::REPL notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm -- cpanm: name=Term::ReadLine::Gnu notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm -- cpanm: name=PPI notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm -- cpanm: name=Data::Dumper::Concise notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm -- cpanm: name=File::Next notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm -- cpanm: name=Sys::SigAction notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm -- cpanm: name=Lexical::Persistence notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm -- cpanm: name=Data::Printer notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm -- cpanm: name=Devel::REPL::Plugin::ReadLineHistory::WithoutExpansion notest=true locallib=/home/vagrant/perl executable=/usr/local/bin/cpanm - -- name: fix ownership of repl stuff - file: path=/home/vagrant/perl owner=vagrant group=vagrant recurse=true - -- name: copy re.pl - copy: src=re.pl dest=/usr/local/bin/re.pl mode=0755 - -- name: fix start_morbo perms - file: path=/vagrant/scripts/start_morbo mode=0755 - -- name: link start_morbo - file: path=/usr/local/bin/start_morbo src=/vagrant/scripts/start_morbo state=link force=true - -- name: copy use-nytprof - copy: src=use-nytprof dest=/usr/local/bin/use-nytprof mode=0755 - -- name: mkdir .re.pl - file: path=/home/vagrant/.re.pl state=directory owner=vagrant group=vagrant mode=0775 - -- name: copy .re.pl/repl.rc - copy: src=repl.rc dest=/home/vagrant/.re.pl/repl.rc mode=0644 - diff --git a/vagrant_support/dovecot.j2 b/vagrant_support/dovecot.j2 deleted file mode 100644 index 31a35201a..000000000 --- a/vagrant_support/dovecot.j2 +++ /dev/null @@ -1,15 +0,0 @@ -protocols = pop3 imap -ssl = no -auth_mechanisms = plain login cram-md5 digest-md5 -disable_plaintext_auth = no -mail_location = mbox:~/mail:INBOX=/var/mail/%u -mail_access_groups=mail - -userdb { - driver = passwd -} - -passdb { - driver = static - args = nopassword=yes -} diff --git a/vagrant_support/email.yml b/vagrant_support/email.yml deleted file mode 100644 index a988e240b..000000000 --- a/vagrant_support/email.yml +++ /dev/null @@ -1,32 +0,0 @@ ---- - -- name: install mail packages - yum: name={{item}} state=present - with_items: ["mutt", "postfix", "dovecot"] - -- name: configure postfix - copy: - src: postfix/main.cf - dest: /etc/postfix/main.cf - -- name: redirect all email to vagrant user - copy: - src: postfix/virtual - dest: /etc/postfix/virtual - -- name: enable postfix - service: name=postfix enabled=yes - -- name: restart postfix - service: name=postfix state=restarted - -- name: configure dovecot - template: - src: dovecot.j2 - dest: /etc/dovecot/dovecot.conf - -- name: enable dovecot - service: name=dovecot enabled=yes - -- name: restart dovecot - service: name=dovecot state=restarted diff --git a/vagrant_support/hyperv-static-ip-db.j2 b/vagrant_support/hyperv-static-ip-db.j2 deleted file mode 100644 index 49ee158b9..000000000 --- a/vagrant_support/hyperv-static-ip-db.j2 +++ /dev/null @@ -1,8 +0,0 @@ -DEVICE=eth0:0 -TYPE=Ethernet -ONBOOT=yes -BOOTPROTO=none -IPADDR={{DB_IP}} -PREFIX=24 -GATEWAY={{GATEWAY_IP}} -DNS1={{DNS_IP}} diff --git a/vagrant_support/hyperv-static-ip-web.j2 b/vagrant_support/hyperv-static-ip-web.j2 deleted file mode 100644 index a7c8e58c1..000000000 --- a/vagrant_support/hyperv-static-ip-web.j2 +++ /dev/null @@ -1,8 +0,0 @@ -DEVICE=eth0:0 -TYPE=Ethernet -ONBOOT=yes -BOOTPROTO=none -IPADDR={{WEB_IP}} -PREFIX=24 -GATEWAY={{GATEWAY_IP}} -DNS1={{DNS_IP}} diff --git a/vagrant_support/hypnotoad b/vagrant_support/hypnotoad deleted file mode 100755 index 14a48b510..000000000 --- a/vagrant_support/hypnotoad +++ /dev/null @@ -1,122 +0,0 @@ -#!/bin/bash -# -# bugzilla-push This starts, stops, and restarts the Bugzilla push -# daemon, which manages syncronising bugzilla.mozilla.org and -# third party Bugzilla installs. -# -# chkconfig: 345 85 15 -# description: Bugzilla push daemon -# -### BEGIN INIT INFO -# Provides: bugzilla-push -# Required-Start: $local_fs $syslog MTA mysqld -# Required-Stop: $local_fs $syslog MTA mysqld -# Default-Start: 3 5 -# Default-Stop: 0 1 2 6 -# Short-Description: Start and stop the Bugzilla push daemon. -# Description: The Bugzilla push daemon (bugzilla-pushd.pl) -# -# -# -### END INIT INFO - -NAME=`basename $0` - -################# -# Configuration # -################# - -# This should be the path to your Bugzilla -BUGZILLA=/vagrant -# Who owns the Bugzilla directory and files? -USER=vagrant - -PERL5LIB="$BUGZILLA:$BUGZILLA/lib:$BUGZILLA/local/lib/perl5" -export PERL5LIB -export MOJO_MODE - -if [[ x$PORT == x ]]; then - PORT=80 - export PORT -fi - -# If you want to pass any options to the daemon (like -d for debugging) -# specify it here. -OPTIONS="" - -# You can also override the configuration by creating a -# /etc/sysconfig/bugzilla-queue file so that you don't -# have to edit this script. -if [ -r /etc/sysconfig/$NAME ]; then - . /etc/sysconfig/$NAME -fi - -########## -# Script # -########## - -RETVAL=0 -BIN="$BUGZILLA/local/bin/hypnotoad" -PIDFILE="$BUGZILLA/hypnotoad.pid" - -# Source function library. -. /etc/rc.d/init.d/functions - -usage () -{ - echo "Usage: service $NAME {start|stop|status|restart|condrestart}" - RETVAL=1 -} - - -start () -{ - if [[ -f $PIDFILE ]]; then - checkpid "$(cat $PIDFILE)" && return 0 - fi - echo -n "Starting $NAME: " - daemon --pidfile=$PIDFILE --user=$USER "cd $BUGZILLA && $BIN bugzilla.pl >/dev/null" - ret=$? - [ $ret -eq "0" ] && touch /var/lock/subsys/$NAME - echo - return $ret -} - -stop () -{ - cd $BUGZILLA && $BIN bugzilla.pl --stop - rm -f /var/lock/subsys/$NAME -} - -restart () -{ - stop - start -} - -condrestart () -{ - [ -e /var/lock/subsys/$NAME ] && restart || return 0 -} - -status () -{ - if [[ -f $PIDFILE ]] && checkpid "$(cat $PIDFILE)"; then - echo hypnotoad is amazing - return 0 - else - echo hypnotoad is not running - return 1 - fi -} - -case "$1" in - start) start; RETVAL=$? ;; - stop) stop; RETVAL=$? ;; - status) status; RETVAL=$?;; - restart) restart; RETVAL=$? ;; - condrestart) condrestart; RETVAL=$? ;; - *) usage ; RETVAL=2 ;; -esac - -exit $RETVAL diff --git a/vagrant_support/hypnotoad.yml b/vagrant_support/hypnotoad.yml deleted file mode 100644 index ebfd27737..000000000 --- a/vagrant_support/hypnotoad.yml +++ /dev/null @@ -1,27 +0,0 @@ -- name: grant perl ability to listen to privledged ports - command: setcap 'cap_net_bind_service=+ep' /usr/bin/perl - -- name: hypnotoad daemon sysconfig - copy: - dest: /etc/sysconfig/hypnotoad - mode: 0644 - content: | - BUGZILLA=/vagrant - USER=vagrant - MOJO_MODE=development - -- name: hypnotoad daemon init file - template: - dest: /etc/init.d/hypnotoad - src: hypnotoad - owner: root - group: root - mode: 0755 - -- name: disable hypnotoad - service: name=hypnotoad enabled=no - when: LAZY == 0 - -- name: stop hypnotoad - service: name=hypnotoad state=stopped - diff --git a/vagrant_support/jobqueue.yml b/vagrant_support/jobqueue.yml deleted file mode 100644 index 886f4e3ef..000000000 --- a/vagrant_support/jobqueue.yml +++ /dev/null @@ -1,21 +0,0 @@ -- name: fix jobqueue perms - file: - path: /vagrant/jobqueue.pl - mode: 0750 - -- name: install job queue - command: /vagrant/jobqueue.pl install chdir=/vagrant creates=/etc/init.d/bugzilla-queue - -- name: configure jobqueue - copy: - dest: /etc/sysconfig/bugzilla-queue - mode: 0644 - content: | - BUGZILLA=/vagrant - USER=vagrant - -- name: enable jobqueue - service: name=bugzilla-queue enabled=yes - -- name: restart jobqueue - command: service bugzilla-queue restart diff --git a/vagrant_support/memcached.yml b/vagrant_support/memcached.yml deleted file mode 100644 index 2031c2e2a..000000000 --- a/vagrant_support/memcached.yml +++ /dev/null @@ -1,10 +0,0 @@ ---- - -- name: install memcached - yum: name=memcached state=present - -- name: enable memcached - service: name=memcached enabled=yes - -- name: restart memcached - service: name=memcached state=restarted diff --git a/vagrant_support/my.cnf b/vagrant_support/my.cnf deleted file mode 100644 index 1f3d13546..000000000 --- a/vagrant_support/my.cnf +++ /dev/null @@ -1,47 +0,0 @@ -[mysqld] -datadir=/var/lib/mysql -socket=/var/lib/mysql/mysql.sock -user=mysql -# Disabling symbolic-links is recommended to prevent assorted security risks -symbolic-links=0 - -default_storage_engine = InnoDB -key_buffer_size = 32M -myisam_recover = FORCE,BACKUP -max_allowed_packet = 1G -max_connect_errors = 1000000 -innodb = FORCE -datadir = /var/lib/mysql -character-set-server = utf8 -collation-server = utf8_general_ci - -tmp_table_size = 32M -max_heap_table_size = 32M -query_cache_type = 0 -query_cache_size = 0 -max_connections = 500 -thread_cache_size = 50 -#open_files_limit = 65535 -table_definition_cache = 1024 -table_open_cache = 2048 - -innodb_buffer_pool_size = 1G -innodb_file_format = Barracuda -innodb_file_per_table = 1 -innodb_flush_log_at_trx_commit = 2 -innodb_flush_method = O_DIRECT -innodb_flush_neighbors = 0 -innodb_large_prefix = 1 -innodb_log_file_size = 256M -innodb_log_files_in_group = 2 - -log_error = /var/lib/mysql/mysql-error.log -log_queries_not_using_indexes = 0 -slow_query_log = 0 -slow_query_log_file = /var/lib/mysql/mysql-slow.log -general_log = 0 -general_log_file = /var/lib/mysql/bmo_query.log - -[mysqld_safe] -log-error=/var/log/mysqld.log -pid-file=/var/run/mysqld/mysqld.pid diff --git a/vagrant_support/ntp.conf b/vagrant_support/ntp.conf deleted file mode 100644 index 8db0de6d2..000000000 --- a/vagrant_support/ntp.conf +++ /dev/null @@ -1,54 +0,0 @@ -tinker panic 0 -# For more information about this file, see the man pages -# ntp.conf(5), ntp_acc(5), ntp_auth(5), ntp_clock(5), ntp_misc(5), ntp_mon(5). - -driftfile /var/lib/ntp/drift - -# Permit time synchronization with our time source, but do not -# permit the source to query or modify the service on this system. -restrict default kod nomodify notrap nopeer noquery -restrict -6 default kod nomodify notrap nopeer noquery - -# Permit all access over the loopback interface. This could -# be tightened as well, but to do so would effect some of -# the administrative functions. -restrict 127.0.0.1 -restrict -6 ::1 - -# Hosts on local network are less restricted. -#restrict 192.168.1.0 mask 255.255.255.0 nomodify notrap - -# Use public servers from the pool.ntp.org project. -# Please consider joining the pool (http://www.pool.ntp.org/join.html). -server 0.centos.pool.ntp.org iburst -server 1.centos.pool.ntp.org iburst -server 2.centos.pool.ntp.org iburst -server 3.centos.pool.ntp.org iburst - -#broadcast 192.168.1.255 autokey # broadcast server -#broadcastclient # broadcast client -#broadcast 224.0.1.1 autokey # multicast server -#multicastclient 224.0.1.1 # multicast client -#manycastserver 239.255.254.254 # manycast server -#manycastclient 239.255.254.254 autokey # manycast client - -# Enable public key cryptography. -#crypto - -includefile /etc/ntp/crypto/pw - -# Key file containing the keys and key identifiers used when operating -# with symmetric key cryptography. -keys /etc/ntp/keys - -# Specify the key identifiers which are trusted. -#trustedkey 4 8 42 - -# Specify the key identifier to use with the ntpdc utility. -#requestkey 8 - -# Specify the key identifier to use with the ntpq utility. -#controlkey 8 - -# Enable writing of statistics records. -#statistics clockstats cryptostats loopstats peerstats \ No newline at end of file diff --git a/vagrant_support/playbook.yml b/vagrant_support/playbook.yml deleted file mode 100644 index 482998f9e..000000000 --- a/vagrant_support/playbook.yml +++ /dev/null @@ -1,263 +0,0 @@ ---- -- hosts: all - become: true - tasks: - - import_tasks: timezone.yml - - name: install epel-release - yum: name=epel-release state=present - - - name: install common packages - yum: name={{item}} state=present - with_items: - - htop - - libselinux-python - - ntp - - policycoreutils-python - - pyOpenSSL - - python-pyasn1 - - python-sphinx10 - - python-urllib3 - - python2-ndg_httpsclient - - - name: link sphinx - file: src=/usr/bin/sphinx-1.0-{{ item }} dest=/usr/bin/sphinx-{{ item }} state=link force=true - with_items: - - autogen - - build - - quickstart - - - name: permissive selinux - selinux: state=permissive policy=targeted - - - name: disable selinux on reboot - selinux: state=disabled - - - name: 'add {{WEB_HOSTNAME}} to /etc/hosts' - lineinfile: - dest: /etc/hosts - regexp: '{{WEB_HOSTNAME}}' - line: '{{WEB_IP}} {{WEB_HOSTNAME}}' - owner: root - group: root - mode: 0644 - - - name: 'add {{DB_HOSTNAME}} to /etc/hosts' - lineinfile: - dest: /etc/hosts - regexp: '{{DB_HOSTNAME}}' - line: '{{DB_IP}} {{DB_HOSTNAME}}' - owner: root - group: root - mode: 0644 - - - name: 'add LOG4PERL_CONFIG_FILE' - lineinfile: - dest: /etc/environment - regexp: 'LOG4PERL_CONFIG_FILE=' - line: 'LOG4PERL_CONFIG_FILE=log4perl-vagrant.conf' - owner: root - group: root - mode: 0644 - - - name: 'add MOJO_LISTEN' - lineinfile: - dest: /etc/environment - regexp: 'MOJO_LISTEN=' - line: 'MOJO_LISTEN=http://*::80' - owner: root - group: root - mode: 0644 - - - name: copy ntp.conf - copy: - src: ntp.conf - dest: /etc/ntp.conf - - - name: setup time server - service: name=ntpd enabled=yes - - - name: stop time server to run ntpdate - service: name=ntpd state=stopped - - - name: run ntpdate - shell: ntpdate pool.ntp.org - - - name: start time server - service: name=ntpd state=started - -- hosts: db - become: true - tasks: - - name: Add an Ethernet alias with static IP configuration (hyperv only) - template: - src: hyperv-static-ip-db.j2 - dest: /etc/sysconfig/network-scripts/ifcfg-eth0:0 - mode: 0644 - when: HYPERV == '1' - - - name: Restart network service for interface eth0:0 - service: - name: network - state: restarted - args: eth0:0 - when: HYPERV == '1' - - - name: fetch ius-release.rpm - get_url: - url: https://moz-devservices-bmocartons.s3.amazonaws.com/third-party/ius-release.rpm - dest: /tmp/ius-release.rpm - mode: 0600 - - - name: fetch mysql rpm - get_url: - url: https://moz-devservices-bmocartons.s3.amazonaws.com/third-party/mysql-community-release-el6-5.noarch.rpm - dest: /tmp/mysql-community-release-el6-5.noarch.rpm - mode: 0600 - - - name: add some extra repos - yum: name={{item}} state=present - with_items: - - /tmp/ius-release.rpm - - /tmp/mysql-community-release-el6-5.noarch.rpm - - - name: install mysql-server - yum: name=mysql-community-server state=present - - - name: copy my.cnf - copy: - src: my.cnf - dest: /etc/my.cnf - - - name: enable mysqld - service: name=mysqld enabled=yes - - - name: restart mysqld - service: name=mysqld state=restarted - - - name: 'check for bugs_bmo (failure is ok)' - shell: mysql -u root -e 'show databases' | grep bugs_bmo - register: bugs_bmo - ignore_errors: true - - - name: create bugs_bmo - shell: |- - mysqladmin -u root create bugs_bmo - mysql -u root -e "GRANT ALL ON bugs_bmo.* TO 'bugs'@'%' IDENTIFIED BY 'bugs'" - when: bugs_bmo is failed - -- hosts: web - become: true - tasks: - - name: Add an Ethernet alias with static IP configuration (hyperv only) - template: - src: hyperv-static-ip-web.j2 - dest: /etc/sysconfig/network-scripts/ifcfg-eth0:0 - mode: 0644 - when: HYPERV == '1' - - - name: Restart network service for interface eth0:0 (hyperv only) - service: - name: network - state: restarted - args: eth0:0 - when: HYPERV == '1' - - - name: install web-specific packages - yum: name={{item}} state=present - with_items: - - autoconf - - automake - - binutils - - bison - - byacc - - elfutils - - flex - - gcc - - gcc-c++ - - gd - - gd-devel - - gettext - - git - - libtool - - make - - mod_perl - - mod_perl-devel - - openssl - - openssl-devel - - patch - - patchutils - - perl - - perl-core - - pkgconfig - - rpm-build - - graphviz - - ncurses-devel - - readline-devel - - - name: fetch tct - unarchive: - src: https://github.com/dylanwh/tocotrienol/releases/download/1.0.6/tct-centos6.tar.xz - dest: /usr/local/bin - remote_src: yes - mode: '0755' - - - name: fetch cpanm - get_url: - url: http://cpanmin.us - dest: /usr/local/bin/cpanm - mode: '0755' - - - name: 'check /opt/bmo (failure is ok)' - shell: test -d /opt/bmo && test -f /opt/bmo/local/lib/perl5/Plack.pm - register: opt_bmo - ignore_errors: true - - - name: install vendor tarball - unarchive: - src: '{{VENDOR_BUNDLE_URL}}' - dest: /opt - remote_src: true - when: opt_bmo is failed - - - name: check /opt/bmo - shell: test -d /opt/bmo && test -f /opt/bmo/local/lib/perl5/Plack.pm - when: opt_bmo is failed - - - name: add local symlink - file: path=/vagrant/local src=/opt/bmo/local state=link force=true - - - name: make bmo data dir - file: path=/data state=directory owner=vagrant group=apache mode=0775 - - - name: fix owner of /vagrant - file: path=/vagrant state=directory owner=vagrant group=apache recurse=yes - - - name: add data symlink - file: path=/vagrant/data src=/data state=link force=true - - - import_tasks: memcached.yml - - - name: add vagrant to apache group - user: name=vagrant groups=apache append=yes - - - name: bmo bundle refresher script - template: - src: bmo-refresh-bundle.j2 - dest: /usr/local/bin/bmo-refresh-bundle - mode: 0755 - - - include_tasks: checksetup.yml - vars: - LAZY: 0 - - import_tasks: cron.yml - - import_tasks: jobqueue.yml - - import_tasks: push.yml - - import_tasks: email.yml - - include_tasks: apache.yml - vars: - LAZY: 0 - - include_tasks: hypnotoad.yml - vars: - LAZY: 0 - - import_tasks: devtools.yml - diff --git a/vagrant_support/postfix/main.cf b/vagrant_support/postfix/main.cf deleted file mode 100644 index 3abb279c4..000000000 --- a/vagrant_support/postfix/main.cf +++ /dev/null @@ -1,678 +0,0 @@ -# Global Postfix configuration file. This file lists only a subset -# of all parameters. For the syntax, and for a complete parameter -# list, see the postconf(5) manual page (command: "man 5 postconf"). -# -# For common configuration examples, see BASIC_CONFIGURATION_README -# and STANDARD_CONFIGURATION_README. To find these documents, use -# the command "postconf html_directory readme_directory", or go to -# http://www.postfix.org/. -# -# For best results, change no more than 2-3 parameters at a time, -# and test if Postfix still works after every change. - -# SOFT BOUNCE -# -# The soft_bounce parameter provides a limited safety net for -# testing. When soft_bounce is enabled, mail will remain queued that -# would otherwise bounce. This parameter disables locally-generated -# bounces, and prevents the SMTP server from rejecting mail permanently -# (by changing 5xx replies into 4xx replies). However, soft_bounce -# is no cure for address rewriting mistakes or mail routing mistakes. -# -#soft_bounce = no - -# LOCAL PATHNAME INFORMATION -# -# The queue_directory specifies the location of the Postfix queue. -# This is also the root directory of Postfix daemons that run chrooted. -# See the files in examples/chroot-setup for setting up Postfix chroot -# environments on different UNIX systems. -# -queue_directory = /var/spool/postfix - -# The command_directory parameter specifies the location of all -# postXXX commands. -# -command_directory = /usr/sbin - -# The daemon_directory parameter specifies the location of all Postfix -# daemon programs (i.e. programs listed in the master.cf file). This -# directory must be owned by root. -# -daemon_directory = /usr/libexec/postfix - -# The data_directory parameter specifies the location of Postfix-writable -# data files (caches, random numbers). This directory must be owned -# by the mail_owner account (see below). -# -data_directory = /var/lib/postfix - -# QUEUE AND PROCESS OWNERSHIP -# -# The mail_owner parameter specifies the owner of the Postfix queue -# and of most Postfix daemon processes. Specify the name of a user -# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS -# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM. In -# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED -# USER. -# -mail_owner = postfix - -# The default_privs parameter specifies the default rights used by -# the local delivery agent for delivery to external file or command. -# These rights are used in the absence of a recipient user context. -# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER. -# -#default_privs = nobody - -# INTERNET HOST AND DOMAIN NAMES -# -# The myhostname parameter specifies the internet hostname of this -# mail system. The default is to use the fully-qualified domain name -# from gethostname(). $myhostname is used as a default value for many -# other configuration parameters. -# -#myhostname = host.domain.tld -#myhostname = virtual.domain.tld - -# The mydomain parameter specifies the local internet domain name. -# The default is to use $myhostname minus the first component. -# $mydomain is used as a default value for many other configuration -# parameters. -# -#mydomain = domain.tld - -# SENDING MAIL -# -# The myorigin parameter specifies the domain that locally-posted -# mail appears to come from. The default is to append $myhostname, -# which is fine for small sites. If you run a domain with multiple -# machines, you should (1) change this to $mydomain and (2) set up -# a domain-wide alias database that aliases each user to -# user@that.users.mailhost. -# -# For the sake of consistency between sender and recipient addresses, -# myorigin also specifies the default domain name that is appended -# to recipient addresses that have no @domain part. -# -#myorigin = $myhostname -#myorigin = $mydomain - -# RECEIVING MAIL - -# The inet_interfaces parameter specifies the network interface -# addresses that this mail system receives mail on. By default, -# the software claims all active interfaces on the machine. The -# parameter also controls delivery of mail to user@[ip.address]. -# -# See also the proxy_interfaces parameter, for network addresses that -# are forwarded to us via a proxy or network address translator. -# -# Note: you need to stop/start Postfix when this parameter changes. -# -#inet_interfaces = all -#inet_interfaces = $myhostname -#inet_interfaces = $myhostname, localhost -inet_interfaces = localhost - -# Enable IPv4, and IPv6 if supported -inet_protocols = all - -# The proxy_interfaces parameter specifies the network interface -# addresses that this mail system receives mail on by way of a -# proxy or network address translation unit. This setting extends -# the address list specified with the inet_interfaces parameter. -# -# You must specify your proxy/NAT addresses when your system is a -# backup MX host for other domains, otherwise mail delivery loops -# will happen when the primary MX host is down. -# -#proxy_interfaces = -#proxy_interfaces = 1.2.3.4 - -# The mydestination parameter specifies the list of domains that this -# machine considers itself the final destination for. -# -# These domains are routed to the delivery agent specified with the -# local_transport parameter setting. By default, that is the UNIX -# compatible delivery agent that lookups all recipients in /etc/passwd -# and /etc/aliases or their equivalent. -# -# The default is $myhostname + localhost.$mydomain. On a mail domain -# gateway, you should also include $mydomain. -# -# Do not specify the names of virtual domains - those domains are -# specified elsewhere (see VIRTUAL_README). -# -# Do not specify the names of domains that this machine is backup MX -# host for. Specify those names via the relay_domains settings for -# the SMTP server, or use permit_mx_backup if you are lazy (see -# STANDARD_CONFIGURATION_README). -# -# The local machine is always the final destination for mail addressed -# to user@[the.net.work.address] of an interface that the mail system -# receives mail on (see the inet_interfaces parameter). -# -# Specify a list of host or domain names, /file/name or type:table -# patterns, separated by commas and/or whitespace. A /file/name -# pattern is replaced by its contents; a type:table is matched when -# a name matches a lookup key (the right-hand side is ignored). -# Continue long lines by starting the next line with whitespace. -# -# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS". -# -mydestination = $myhostname, localhost.$mydomain, localhost -#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain -#mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain, -# mail.$mydomain, www.$mydomain, ftp.$mydomain - -# REJECTING MAIL FOR UNKNOWN LOCAL USERS -# -# The local_recipient_maps parameter specifies optional lookup tables -# with all names or addresses of users that are local with respect -# to $mydestination, $inet_interfaces or $proxy_interfaces. -# -# If this parameter is defined, then the SMTP server will reject -# mail for unknown local users. This parameter is defined by default. -# -# To turn off local recipient checking in the SMTP server, specify -# local_recipient_maps = (i.e. empty). -# -# The default setting assumes that you use the default Postfix local -# delivery agent for local delivery. You need to update the -# local_recipient_maps setting if: -# -# - You define $mydestination domain recipients in files other than -# /etc/passwd, /etc/aliases, or the $virtual_alias_maps files. -# For example, you define $mydestination domain recipients in -# the $virtual_mailbox_maps files. -# -# - You redefine the local delivery agent in master.cf. -# -# - You redefine the "local_transport" setting in main.cf. -# -# - You use the "luser_relay", "mailbox_transport", or "fallback_transport" -# feature of the Postfix local delivery agent (see local(8)). -# -# Details are described in the LOCAL_RECIPIENT_README file. -# -# Beware: if the Postfix SMTP server runs chrooted, you probably have -# to access the passwd file via the proxymap service, in order to -# overcome chroot restrictions. The alternative, having a copy of -# the system passwd file in the chroot jail is just not practical. -# -# The right-hand side of the lookup tables is conveniently ignored. -# In the left-hand side, specify a bare username, an @domain.tld -# wild-card, or specify a user@domain.tld address. -# -#local_recipient_maps = unix:passwd.byname $alias_maps -#local_recipient_maps = proxy:unix:passwd.byname $alias_maps -#local_recipient_maps = - -# The unknown_local_recipient_reject_code specifies the SMTP server -# response code when a recipient domain matches $mydestination or -# ${proxy,inet}_interfaces, while $local_recipient_maps is non-empty -# and the recipient address or address local-part is not found. -# -# The default setting is 550 (reject mail) but it is safer to start -# with 450 (try again later) until you are certain that your -# local_recipient_maps settings are OK. -# -unknown_local_recipient_reject_code = 550 - -# TRUST AND RELAY CONTROL - -# The mynetworks parameter specifies the list of "trusted" SMTP -# clients that have more privileges than "strangers". -# -# In particular, "trusted" SMTP clients are allowed to relay mail -# through Postfix. See the smtpd_recipient_restrictions parameter -# in postconf(5). -# -# You can specify the list of "trusted" network addresses by hand -# or you can let Postfix do it for you (which is the default). -# -# By default (mynetworks_style = subnet), Postfix "trusts" SMTP -# clients in the same IP subnetworks as the local machine. -# On Linux, this does works correctly only with interfaces specified -# with the "ifconfig" command. -# -# Specify "mynetworks_style = class" when Postfix should "trust" SMTP -# clients in the same IP class A/B/C networks as the local machine. -# Don't do this with a dialup site - it would cause Postfix to "trust" -# your entire provider's network. Instead, specify an explicit -# mynetworks list by hand, as described below. -# -# Specify "mynetworks_style = host" when Postfix should "trust" -# only the local machine. -# -#mynetworks_style = class -#mynetworks_style = subnet -#mynetworks_style = host - -# Alternatively, you can specify the mynetworks list by hand, in -# which case Postfix ignores the mynetworks_style setting. -# -# Specify an explicit list of network/netmask patterns, where the -# mask specifies the number of bits in the network part of a host -# address. -# -# You can also specify the absolute pathname of a pattern file instead -# of listing the patterns here. Specify type:table for table-based lookups -# (the value on the table right-hand side is not used). -# -#mynetworks = 168.100.189.0/28, 127.0.0.0/8 -#mynetworks = $config_directory/mynetworks -#mynetworks = hash:/etc/postfix/network_table - -# The relay_domains parameter restricts what destinations this system will -# relay mail to. See the smtpd_recipient_restrictions description in -# postconf(5) for detailed information. -# -# By default, Postfix relays mail -# - from "trusted" clients (IP address matches $mynetworks) to any destination, -# - from "untrusted" clients to destinations that match $relay_domains or -# subdomains thereof, except addresses with sender-specified routing. -# The default relay_domains value is $mydestination. -# -# In addition to the above, the Postfix SMTP server by default accepts mail -# that Postfix is final destination for: -# - destinations that match $inet_interfaces or $proxy_interfaces, -# - destinations that match $mydestination -# - destinations that match $virtual_alias_domains, -# - destinations that match $virtual_mailbox_domains. -# These destinations do not need to be listed in $relay_domains. -# -# Specify a list of hosts or domains, /file/name patterns or type:name -# lookup tables, separated by commas and/or whitespace. Continue -# long lines by starting the next line with whitespace. A file name -# is replaced by its contents; a type:name table is matched when a -# (parent) domain appears as lookup key. -# -# NOTE: Postfix will not automatically forward mail for domains that -# list this system as their primary or backup MX host. See the -# permit_mx_backup restriction description in postconf(5). -# -#relay_domains = $mydestination - -# INTERNET OR INTRANET - -# The relayhost parameter specifies the default host to send mail to -# when no entry is matched in the optional transport(5) table. When -# no relayhost is given, mail is routed directly to the destination. -# -# On an intranet, specify the organizational domain name. If your -# internal DNS uses no MX records, specify the name of the intranet -# gateway host instead. -# -# In the case of SMTP, specify a domain, host, host:port, [host]:port, -# [address] or [address]:port; the form [host] turns off MX lookups. -# -# If you're connected via UUCP, see also the default_transport parameter. -# -#relayhost = $mydomain -#relayhost = [gateway.my.domain] -#relayhost = [mailserver.isp.tld] -#relayhost = uucphost -#relayhost = [an.ip.add.ress] - -# REJECTING UNKNOWN RELAY USERS -# -# The relay_recipient_maps parameter specifies optional lookup tables -# with all addresses in the domains that match $relay_domains. -# -# If this parameter is defined, then the SMTP server will reject -# mail for unknown relay users. This feature is off by default. -# -# The right-hand side of the lookup tables is conveniently ignored. -# In the left-hand side, specify an @domain.tld wild-card, or specify -# a user@domain.tld address. -# -#relay_recipient_maps = hash:/etc/postfix/relay_recipients - -# INPUT RATE CONTROL -# -# The in_flow_delay configuration parameter implements mail input -# flow control. This feature is turned on by default, although it -# still needs further development (it's disabled on SCO UNIX due -# to an SCO bug). -# -# A Postfix process will pause for $in_flow_delay seconds before -# accepting a new message, when the message arrival rate exceeds the -# message delivery rate. With the default 100 SMTP server process -# limit, this limits the mail inflow to 100 messages a second more -# than the number of messages delivered per second. -# -# Specify 0 to disable the feature. Valid delays are 0..10. -# -#in_flow_delay = 1s - -# ADDRESS REWRITING -# -# The ADDRESS_REWRITING_README document gives information about -# address masquerading or other forms of address rewriting including -# username->Firstname.Lastname mapping. - -# ADDRESS REDIRECTION (VIRTUAL DOMAIN) -# -# The VIRTUAL_README document gives information about the many forms -# of domain hosting that Postfix supports. - -# "USER HAS MOVED" BOUNCE MESSAGES -# -# See the discussion in the ADDRESS_REWRITING_README document. - -# TRANSPORT MAP -# -# See the discussion in the ADDRESS_REWRITING_README document. - -# ALIAS DATABASE -# -# The alias_maps parameter specifies the list of alias databases used -# by the local delivery agent. The default list is system dependent. -# -# On systems with NIS, the default is to search the local alias -# database, then the NIS alias database. See aliases(5) for syntax -# details. -# -# If you change the alias database, run "postalias /etc/aliases" (or -# wherever your system stores the mail alias file), or simply run -# "newaliases" to build the necessary DBM or DB file. -# -# It will take a minute or so before changes become visible. Use -# "postfix reload" to eliminate the delay. -# -#alias_maps = dbm:/etc/aliases -alias_maps = hash:/etc/aliases -#alias_maps = hash:/etc/aliases, nis:mail.aliases -#alias_maps = netinfo:/aliases - -# The alias_database parameter specifies the alias database(s) that -# are built with "newaliases" or "sendmail -bi". This is a separate -# configuration parameter, because alias_maps (see above) may specify -# tables that are not necessarily all under control by Postfix. -# -#alias_database = dbm:/etc/aliases -#alias_database = dbm:/etc/mail/aliases -alias_database = hash:/etc/aliases -#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases - -# ADDRESS EXTENSIONS (e.g., user+foo) -# -# The recipient_delimiter parameter specifies the separator between -# user names and address extensions (user+foo). See canonical(5), -# local(8), relocated(5) and virtual(5) for the effects this has on -# aliases, canonical, virtual, relocated and .forward file lookups. -# Basically, the software tries user+foo and .forward+foo before -# trying user and .forward. -# -#recipient_delimiter = + - -# DELIVERY TO MAILBOX -# -# The home_mailbox parameter specifies the optional pathname of a -# mailbox file relative to a user's home directory. The default -# mailbox file is /var/spool/mail/user or /var/mail/user. Specify -# "Maildir/" for qmail-style delivery (the / is required). -# -#home_mailbox = Mailbox -#home_mailbox = Maildir/ - -# The mail_spool_directory parameter specifies the directory where -# UNIX-style mailboxes are kept. The default setting depends on the -# system type. -# -#mail_spool_directory = /var/mail -#mail_spool_directory = /var/spool/mail - -# The mailbox_command parameter specifies the optional external -# command to use instead of mailbox delivery. The command is run as -# the recipient with proper HOME, SHELL and LOGNAME environment settings. -# Exception: delivery for root is done as $default_user. -# -# Other environment variables of interest: USER (recipient username), -# EXTENSION (address extension), DOMAIN (domain part of address), -# and LOCAL (the address localpart). -# -# Unlike other Postfix configuration parameters, the mailbox_command -# parameter is not subjected to $parameter substitutions. This is to -# make it easier to specify shell syntax (see example below). -# -# Avoid shell meta characters because they will force Postfix to run -# an expensive shell process. Procmail alone is expensive enough. -# -# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN -# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER. -# -#mailbox_command = /some/where/procmail -#mailbox_command = /some/where/procmail -a "$EXTENSION" - -# The mailbox_transport specifies the optional transport in master.cf -# to use after processing aliases and .forward files. This parameter -# has precedence over the mailbox_command, fallback_transport and -# luser_relay parameters. -# -# Specify a string of the form transport:nexthop, where transport is -# the name of a mail delivery transport defined in master.cf. The -# :nexthop part is optional. For more details see the sample transport -# configuration file. -# -# NOTE: if you use this feature for accounts not in the UNIX password -# file, then you must update the "local_recipient_maps" setting in -# the main.cf file, otherwise the SMTP server will reject mail for -# non-UNIX accounts with "User unknown in local recipient table". -# -#mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp - -# If using the cyrus-imapd IMAP server deliver local mail to the IMAP -# server using LMTP (Local Mail Transport Protocol), this is prefered -# over the older cyrus deliver program by setting the -# mailbox_transport as below: -# -# mailbox_transport = lmtp:unix:/var/lib/imap/socket/lmtp -# -# The efficiency of LMTP delivery for cyrus-imapd can be enhanced via -# these settings. -# -# local_destination_recipient_limit = 300 -# local_destination_concurrency_limit = 5 -# -# Of course you should adjust these settings as appropriate for the -# capacity of the hardware you are using. The recipient limit setting -# can be used to take advantage of the single instance message store -# capability of Cyrus. The concurrency limit can be used to control -# how many simultaneous LMTP sessions will be permitted to the Cyrus -# message store. -# -# To use the old cyrus deliver program you have to set: -#mailbox_transport = cyrus - -# The fallback_transport specifies the optional transport in master.cf -# to use for recipients that are not found in the UNIX passwd database. -# This parameter has precedence over the luser_relay parameter. -# -# Specify a string of the form transport:nexthop, where transport is -# the name of a mail delivery transport defined in master.cf. The -# :nexthop part is optional. For more details see the sample transport -# configuration file. -# -# NOTE: if you use this feature for accounts not in the UNIX password -# file, then you must update the "local_recipient_maps" setting in -# the main.cf file, otherwise the SMTP server will reject mail for -# non-UNIX accounts with "User unknown in local recipient table". -# -#fallback_transport = lmtp:unix:/var/lib/imap/socket/lmtp -#fallback_transport = - -# The luser_relay parameter specifies an optional destination address -# for unknown recipients. By default, mail for unknown@$mydestination, -# unknown@[$inet_interfaces] or unknown@[$proxy_interfaces] is returned -# as undeliverable. -# -# The following expansions are done on luser_relay: $user (recipient -# username), $shell (recipient shell), $home (recipient home directory), -# $recipient (full recipient address), $extension (recipient address -# extension), $domain (recipient domain), $local (entire recipient -# localpart), $recipient_delimiter. Specify ${name?value} or -# ${name:value} to expand value only when $name does (does not) exist. -# -# luser_relay works only for the default Postfix local delivery agent. -# -# NOTE: if you use this feature for accounts not in the UNIX password -# file, then you must specify "local_recipient_maps =" (i.e. empty) in -# the main.cf file, otherwise the SMTP server will reject mail for -# non-UNIX accounts with "User unknown in local recipient table". -# -#luser_relay = $user@other.host -#luser_relay = $local@other.host -#luser_relay = admin+$local - -# JUNK MAIL CONTROLS -# -# The controls listed here are only a very small subset. The file -# SMTPD_ACCESS_README provides an overview. - -# The header_checks parameter specifies an optional table with patterns -# that each logical message header is matched against, including -# headers that span multiple physical lines. -# -# By default, these patterns also apply to MIME headers and to the -# headers of attached messages. With older Postfix versions, MIME and -# attached message headers were treated as body text. -# -# For details, see "man header_checks". -# -#header_checks = regexp:/etc/postfix/header_checks - -# FAST ETRN SERVICE -# -# Postfix maintains per-destination logfiles with information about -# deferred mail, so that mail can be flushed quickly with the SMTP -# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld". -# See the ETRN_README document for a detailed description. -# -# The fast_flush_domains parameter controls what destinations are -# eligible for this service. By default, they are all domains that -# this server is willing to relay mail to. -# -#fast_flush_domains = $relay_domains - -# SHOW SOFTWARE VERSION OR NOT -# -# The smtpd_banner parameter specifies the text that follows the 220 -# code in the SMTP server's greeting banner. Some people like to see -# the mail version advertised. By default, Postfix shows no version. -# -# You MUST specify $myhostname at the start of the text. That is an -# RFC requirement. Postfix itself does not care. -# -#smtpd_banner = $myhostname ESMTP $mail_name -#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) - -# PARALLEL DELIVERY TO THE SAME DESTINATION -# -# How many parallel deliveries to the same user or domain? With local -# delivery, it does not make sense to do massively parallel delivery -# to the same user, because mailbox updates must happen sequentially, -# and expensive pipelines in .forward files can cause disasters when -# too many are run at the same time. With SMTP deliveries, 10 -# simultaneous connections to the same domain could be sufficient to -# raise eyebrows. -# -# Each message delivery transport has its XXX_destination_concurrency_limit -# parameter. The default is $default_destination_concurrency_limit for -# most delivery transports. For the local delivery agent the default is 2. - -#local_destination_concurrency_limit = 2 -#default_destination_concurrency_limit = 20 - -# DEBUGGING CONTROL -# -# The debug_peer_level parameter specifies the increment in verbose -# logging level when an SMTP client or server host name or address -# matches a pattern in the debug_peer_list parameter. -# -debug_peer_level = 2 - -# The debug_peer_list parameter specifies an optional list of domain -# or network patterns, /file/name patterns or type:name tables. When -# an SMTP client or server host name or address matches a pattern, -# increase the verbose logging level by the amount specified in the -# debug_peer_level parameter. -# -#debug_peer_list = 127.0.0.1 -#debug_peer_list = some.domain - -# The debugger_command specifies the external command that is executed -# when a Postfix daemon program is run with the -D option. -# -# Use "command .. & sleep 5" so that the debugger can attach before -# the process marches on. If you use an X-based debugger, be sure to -# set up your XAUTHORITY environment variable before starting Postfix. -# -debugger_command = - PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin - ddd $daemon_directory/$process_name $process_id & sleep 5 - -# If you can't use X, use this to capture the call stack when a -# daemon crashes. The result is in a file in the configuration -# directory, and is named after the process name and the process ID. -# -# debugger_command = -# PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont; -# echo where) | gdb $daemon_directory/$process_name $process_id 2>&1 -# >$config_directory/$process_name.$process_id.log & sleep 5 -# -# Another possibility is to run gdb under a detached screen session. -# To attach to the screen sesssion, su root and run "screen -r -# " where uniquely matches one of the detached -# sessions (from "screen -list"). -# -# debugger_command = -# PATH=/bin:/usr/bin:/sbin:/usr/sbin; export PATH; screen -# -dmS $process_name gdb $daemon_directory/$process_name -# $process_id & sleep 1 - -# INSTALL-TIME CONFIGURATION INFORMATION -# -# The following parameters are used when installing a new Postfix version. -# -# sendmail_path: The full pathname of the Postfix sendmail command. -# This is the Sendmail-compatible mail posting interface. -# -sendmail_path = /usr/sbin/sendmail.postfix - -# newaliases_path: The full pathname of the Postfix newaliases command. -# This is the Sendmail-compatible command to build alias databases. -# -newaliases_path = /usr/bin/newaliases.postfix - -# mailq_path: The full pathname of the Postfix mailq command. This -# is the Sendmail-compatible mail queue listing command. -# -mailq_path = /usr/bin/mailq.postfix - -# setgid_group: The group for mail submission and queue management -# commands. This must be a group name with a numerical group ID that -# is not shared with other accounts, not even with the Postfix account. -# -setgid_group = postdrop - -# html_directory: The location of the Postfix HTML documentation. -# -html_directory = no - -# manpage_directory: The location of the Postfix on-line manual pages. -# -manpage_directory = /usr/share/man - -# sample_directory: The location of the Postfix sample configuration files. -# This parameter is obsolete as of Postfix 2.1. -# -sample_directory = /usr/share/doc/postfix-2.6.6/samples - -# readme_directory: The location of the Postfix README files. -# -readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES - -virtual_alias_maps = pcre:/etc/postfix/virtual diff --git a/vagrant_support/postfix/virtual b/vagrant_support/postfix/virtual deleted file mode 100644 index 12e906541..000000000 --- a/vagrant_support/postfix/virtual +++ /dev/null @@ -1 +0,0 @@ -/.*/ vagrant diff --git a/vagrant_support/push.yml b/vagrant_support/push.yml deleted file mode 100644 index 179f1d2a6..000000000 --- a/vagrant_support/push.yml +++ /dev/null @@ -1,15 +0,0 @@ -- name: push daemon sysconfig - copy: - dest: /etc/sysconfig/bugzilla-push - mode: 0644 - content: | - BUGZILLA=/vagrant - USER=vagrant - -- name: push daemon init file - template: - dest: /etc/init.d/bugzilla-push - src: bugzilla-push - owner: root - group: root - mode: 0755 diff --git a/vagrant_support/re.pl b/vagrant_support/re.pl deleted file mode 100755 index d6deeca8c..000000000 --- a/vagrant_support/re.pl +++ /dev/null @@ -1,6 +0,0 @@ -#!/bin/bash - -exec perl \ - -I$HOME/perl/lib/perl5 \ - -I/vagrant/local/lib/perl5 \ - $HOME/perl/bin/re.pl "$@" diff --git a/vagrant_support/repl.rc b/vagrant_support/repl.rc deleted file mode 100644 index 89ad089a5..000000000 --- a/vagrant_support/repl.rc +++ /dev/null @@ -1,28 +0,0 @@ -#!perl -# vim: set ft=perl: -use Bugzilla; -use Bugzilla::Constants; -Bugzilla->usage_mode(USAGE_MODE_CMDLINE); -Bugzilla->extensions; -use DDP return_value => 'void', colored => 1; - -my @plugins = qw( - Colors - Timing - Completion - CompletionDriver::INC - CompletionDriver::LexEnv - CompletionDriver::Keywords - CompletionDriver::Methods - History - LexEnv - DDS - Packages - Commands - MultiLine::PPI - ReadLineHistory::WithoutExpansion - Peek -); - -$_REPL->load_plugin($_) for @plugins; - diff --git a/vagrant_support/timezone.yml b/vagrant_support/timezone.yml deleted file mode 100644 index f519e21d7..000000000 --- a/vagrant_support/timezone.yml +++ /dev/null @@ -1,18 +0,0 @@ ---- - -- name: check for non-link localtime - stat: path=/etc/localtime - register: localtime - -- name: remove localtime - file: - path: /etc/localtime - state: absent - when: localtime.stat.islnk is defined and localtime.stat.islnk == False - -- name: set timezone to same as production - file: - path: /etc/localtime - src: /usr/share/zoneinfo/UTC - force: true - state: link diff --git a/vagrant_support/update.yml b/vagrant_support/update.yml deleted file mode 100644 index 533da5b5e..000000000 --- a/vagrant_support/update.yml +++ /dev/null @@ -1,26 +0,0 @@ ---- -- hosts: web - become: true - tasks: - - - name: add local symlink - file: path=/vagrant/local src=/opt/bmo/local state=link force=true - - - name: make bmo data dir - file: path=/data state=directory owner=vagrant group=apache mode=0775 - - - name: fix owner of /vagrant - file: path=/vagrant state=directory owner=vagrant group=apache recurse=yes - - - name: add data symlink - file: path=/vagrant/data src=/data state=link force=true - - - include_tasks: checksetup.yml - vars: - LAZY: 1 - - include_tasks: apache.yml - vars: - LAZY: 1 - - include_tasks: hypnotoad.yml - vars: - LAZY: 1 diff --git a/vagrant_support/use-nytprof b/vagrant_support/use-nytprof deleted file mode 100644 index 7c9dd3fba..000000000 --- a/vagrant_support/use-nytprof +++ /dev/null @@ -1,12 +0,0 @@ -#!/bin/bash - -USE_NYTPROF="$1" -if [[ -z $USE_NYTPROF ]]; then - USE_NYTPROF=1 -fi - -perl -e 'warn "Devel::NYTProf is ", $ARGV[0] ? "enabled" : "disabled", "\n";' "$USE_NYTPROF" - -sudo env USE_NYTPROF="$USE_NYTPROF" perl -i -pe 's/^\s*(PerlSetEnv\s+USE_NYTPROF\b).*$/$1 $ENV{USE_NYTPROF}/gmi' \ - /etc/httpd/conf.d/bugzilla.conf -sudo service httpd restart \ No newline at end of file