Commit bfad917f by Joseph Mulloy Committed by GitHub

Merge pull request #4028 from edx/jdmulloy/ops1849/remove_12.04

jdmulloy/ops1849/remove 12.04
parents 0cea60c9 03d3bf54
FROM edxops/precise-common:latest
FROM edxops/xenial-common:latest
MAINTAINER edxops
ADD . /edx/app/edx_ansible/edx_ansible
......
FROM edxops/precise-common
FROM edxops/xenial-common
MAINTAINER edxops
USER root
# Fix selinux issue with useradd on 12.04
RUN curl http://salilab.org/~ben/libselinux1_2.1.0-5.1ubuntu1_amd64.deb -o /tmp/libselinux1_2.1.0-5.1ubuntu1_amd64.deb
RUN dpkg -i /tmp/libselinux1_2.1.0-5.1ubuntu1_amd64.deb
RUN apt-get update
ADD . /edx/app/edx_ansible/edx_ansible
COPY docker/build/xqwatcher/ansible_overrides.yml /
......
FROM edxops/precise-common:latest
FROM edxops/xenial-common:latest
MAINTAINER edxops
USER root
......
FROM edxops/precise-common:latest
FROM edxops/xenial-common:latest
MAINTAINER edxops
USER root
......
FROM ubuntu:precise
MAINTAINER edxops
# Set locale to UTF-8 which is not the default for docker.
# See the links for details:
# http://jaredmarkell.com/docker-and-locales/
# https://github.com/docker-library/python/issues/13
# https://github.com/docker-library/python/pull/14/files
RUN apt-get update &&\
apt-get install -y locales &&\
locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
ENV ANSIBLE_REPO="https://github.com/edx/ansible"
ENV CONFIGURATION_REPO="https://github.com/edx/configuration.git"
ENV CONFIGURATION_VERSION="master"
ADD util/install/ansible-bootstrap.sh /tmp/ansible-bootstrap.sh
RUN chmod +x /tmp/ansible-bootstrap.sh
RUN /tmp/ansible-bootstrap.sh
FROM edxops/precise-common:latest
FROM edxops/xenial-common:latest
MAINTAINER edxops
USER root
......
......@@ -6,8 +6,8 @@
keypair: continuous-integration
instance_type: t2.medium
security_group: sandbox-vpc
# ubuntu 12.04
ami: ami-f478849c
# ubuntu 16.04 - 20170721
ami: ami-cd0f5cb6
region: us-east-1
zone: us-east-1c
instance_tags:
......
......@@ -12,10 +12,6 @@
hosts: "{{TARGET}}"
become: True
gather_facts: True
pre_tasks:
- set_fact:
STOP_ALL_EDX_SERVICES_EXTRA_ARGS: "--no-wait"
when: ansible_distribution_release == 'precise' or ansible_distribution_release == 'trusty'
roles:
- stop_all_edx_services
......
......@@ -157,7 +157,6 @@ common_debian_variants:
# We only have to install old Python for these releases:
old_python_ppa_releases:
- precise
- trusty
common_redhat_variants:
......
......@@ -109,16 +109,6 @@
- install
- install:base
# adding chris-lea nodejs repo
# TODO: 16.04
- name: add ppas for current versions of nodejs
apt_repository:
repo: "{{ edxapp_chrislea_ppa }}"
when: ansible_distribution_release == 'precise'
tags:
- install
- install:base
- name: install system packages on which LMS and CMS rely
apt:
name: "{{ item }}"
......
......@@ -218,7 +218,5 @@ insights_debian_pkgs:
- gettext
insights_release_specific_debian_pkgs:
precise:
- openjdk-7-jdk
xenial:
- openjdk-8-jdk
......@@ -14,6 +14,10 @@ mongo_log_dir: "{{ COMMON_LOG_DIR }}/mongo"
mongo_journal_dir: "{{ COMMON_DATA_DIR }}/mongo/mongodb/journal"
mongo_user: mongodb
# The MONGODB_REPO variable should use {{ ansible_distribution_release }}
# instead of hard coding a release name. Since we are already accidentally
# running precise binaries on trusty, we are going to leave this alone for
# mongo 3.0 and remedy it when we upgrade to mongo 3.2
MONGODB_REPO: "deb http://repo.mongodb.org/apt/ubuntu precise/mongodb-org/3.0 multiverse"
MONGODB_APT_KEY: "7F0CEB10"
MONGODB_APT_KEYSERVER: "keyserver.ubuntu.com"
......
......@@ -33,22 +33,6 @@
# Thought that instead of performing all those steps and get the repo, why not directly use this repo
# `deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6`, I just picked this line and directly used it and it worked for us.
- name: Add MySQL community apt key
apt_key:
id: 8C718D3B5072E1F5
keyserver: "{{ COMMON_EDX_PPA_KEY_SERVER }}"
state: present
when: ansible_distribution_release == 'precise'
# Despite ondrej's ppa having 12.04 support, we would need to do shenanigans and uninstalling
# to switch back cleanly without publishing a new base devstack box. Easier to just clean this
# up with Ficus.
- name: Install MySQL from their community PPA
apt_repository:
repo: "deb http://repo.mysql.com/apt/ubuntu/ precise mysql-5.6"
update_cache: yes
when: ansible_distribution_release == 'precise'
- name: Install mysql-5.6 and dependencies
apt:
name: "{{ item }}"
......
......@@ -20,6 +20,7 @@
apt:
name: "{{ item }}"
state: present
update_cache: yes
with_items: "{{ notifier_debian_pkgs }}"
tags:
- "install"
......
......@@ -115,36 +115,18 @@
- install
- install:base
# 12.04, 14.04, etc.
# 14.04
- name: Create supervisor upstart job
template:
src: "etc/init/supervisor-upstart.conf.j2"
dest: "/etc/init/{{ supervisor_service }}.conf"
owner: root
group: root
when: ansible_distribution_release == 'precise' or ansible_distribution_release == 'trusty'
when: ansible_distribution_release == 'trusty'
tags:
- install
- install:base
# This script is aws specific and looks up instances
# tags and enables services based on the 'services' tag
# on instance startup.
# TODO: 16.04 this cannot simply be dropped, enabling needs to be moved somewhere
# also should not be here, should be in the aws role if it's aws specific
- name: create pre_supervisor upstart job
template:
src: "etc/init/pre_supervisor.conf.j2"
dest: "/etc/init/pre_supervisor.conf"
owner: root
group: root
when: >
supervisor_service == "supervisor" and disable_edx_services and not devstack
and (ansible_distribution_release == 'precise' or ansible_distribution_release == 'trusty')
tags:
- to-remove
- aws-specfic
# NB: with systemd, pre_supervisor is a pre-task for supervisor, not a separate service
- name: Create supervisor systemd job
template:
......
description "Tasks before supervisord"
start on runlevel [2345]
task
{% if credentials_code_dir is defined %}
{% set credentials_command = "--credentials-env " + credentials_home + "/credentials_env --credentials-code-dir " + credentials_code_dir + " --credentials-python " + COMMON_BIN_DIR + "/python.credentials" %}
{% else %}
{% set credentials_command = "" %}
{% endif %}
{% if discovery_code_dir is defined %}
{% set discovery_command = "--discovery-env " + discovery_home + "/discovery_env --discovery-code-dir " + discovery_code_dir + " --discovery-python " + COMMON_BIN_DIR + "/python.discovery" %}
{% else %}
{% set discovery_command = "" %}
{% endif %}
exec {{ supervisor_venv_dir }}/bin/python {{ supervisor_app_dir }}/pre_supervisor_checks.py --available={{ supervisor_available_dir }} --enabled={{ supervisor_cfg_dir }} {% if SUPERVISOR_HIPCHAT_API_KEY is defined %}--hipchat-api-key {{ SUPERVISOR_HIPCHAT_API_KEY }} --hipchat-room {{ SUPERVISOR_HIPCHAT_ROOM }} {% endif %} {% if edxapp_code_dir is defined %}--edxapp-python {{ COMMON_BIN_DIR }}/python.edxapp --edxapp-code-dir {{ edxapp_code_dir }} --edxapp-env {{ edxapp_app_dir }}/edxapp_env{% endif %} {% if xqueue_code_dir is defined %}--xqueue-code-dir {{ xqueue_code_dir }} --xqueue-python {{ COMMON_BIN_DIR }}/python.xqueue {% endif %} {% if ecommerce_code_dir is defined %}--ecommerce-env {{ ecommerce_home }}/ecommerce_env --ecommerce-code-dir {{ ecommerce_code_dir }} --ecommerce-python {{ COMMON_BIN_DIR }}/python.ecommerce {% endif %} {% if insights_code_dir is defined %}--insights-env {{ insights_home }}/insights_env --insights-code-dir {{ insights_code_dir }} --insights-python {{ COMMON_BIN_DIR }}/python.insights {% endif %} {% if analytics_api_code_dir is defined %}--analytics-api-env {{ analytics_api_home }}/analytics_api_env --analytics-api-code-dir {{ analytics_api_code_dir }} --analytics-api-python {{ COMMON_BIN_DIR }}/python.analytics_api {% endif %} {{ discovery_command }} {{ credentials_command }}
---
# The deadsnakes PPA is required to install python3.5 on Precise and Trusty.
# The deadsnakes PPA is required to install python3.5 on Trusty.
# Xenial comes with python3.5 installed.
- name: add deadsnakes repository
apt_repository:
repo: "ppa:fkrull/deadsnakes"
when: ansible_distribution_release == 'precise' or ansible_distribution_release == 'trusty'
when: ansible_distribution_release == 'trusty'
tags:
- install
- install:system-requirements
......@@ -15,7 +15,7 @@
with_items:
- python3.5
- python3.5-dev
when: ansible_distribution_release == 'precise' or ansible_distribution_release == 'trusty'
when: ansible_distribution_release == 'trusty'
tags:
- install
- install:system-requirements
......@@ -47,7 +47,6 @@ VIRTUAL_ENV="/tmp/bootstrap"
PYTHON_BIN="${VIRTUAL_ENV}/bin"
ANSIBLE_DIR="/tmp/ansible"
CONFIGURATION_DIR="/tmp/configuration"
EDX_PPA="deb http://ppa.edx.org precise main"
EDX_PPA_KEY_SERVER="keyserver.ubuntu.com"
EDX_PPA_KEY_ID="B41E5E3969464050"
......@@ -70,10 +69,7 @@ if [[ $(id -u) -ne 0 ]] ;then
exit 1;
fi
if grep -q 'Precise Pangolin' /etc/os-release
then
SHORT_DIST="precise"
elif grep -q 'Trusty Tahr' /etc/os-release
if grep -q 'Trusty Tahr' /etc/os-release
then
SHORT_DIST="trusty"
elif grep -q 'Xenial Xerus' /etc/os-release
......@@ -82,7 +78,7 @@ then
else
cat << EOF
This script is only known to work on Ubuntu Precise, Trusty and Xenial,
This script is only known to work on Ubuntu Trusty and Xenial,
exiting. If you are interested in helping make installation possible
on other platforms, let us know.
......
#!/bin/bash
##
## Installs the pre-requisites for running edX on a single Ubuntu 12.04
## Installs the pre-requisites for running edX on a single Ubuntu 16.04
## instance. This script is provided as a convenience and any of these
## steps could be executed manually.
##
......
......@@ -17,7 +17,6 @@ weights:
- nginx: 1
- xqueue: 2
- trusty-common: 5
- precise-common: 4
- xenial-common: 6
- ecommerce: 6
- rabbitmq: 2
......
......@@ -146,7 +146,7 @@ def parse_args():
group = parser.add_mutually_exclusive_group()
group.add_argument('-b', '--base-ami', required=False,
help="ami to use as a base ami",
default="ami-0568456c")
default="ami-cd0f5cb6")
group.add_argument('--blessed', action='store_true',
help="Look up blessed ami for env-dep-play.",
default=False)
......@@ -330,7 +330,6 @@ fi
VIRTUAL_ENV_VERSION="15.0.2"
PIP_VERSION="8.1.2"
SETUPTOOLS_VERSION="24.0.3"
EDX_PPA="deb http://ppa.edx.org precise main"
EDX_PPA_KEY_SERVER="keyserver.ubuntu.com"
EDX_PPA_KEY_ID="B41E5E3969464050"
......@@ -353,10 +352,7 @@ if [[ $(id -u) -ne 0 ]] ;then
exit 1;
fi
if grep -q 'Precise Pangolin' /etc/os-release
then
SHORT_DIST="precise"
elif grep -q 'Trusty Tahr' /etc/os-release
if grep -q 'Trusty Tahr' /etc/os-release
then
SHORT_DIST="trusty"
elif grep -q 'Xenial Xerus' /etc/os-release
......@@ -365,7 +361,7 @@ then
else
cat << EOF
This script is only known to work on Ubuntu Precise, Trusty and Xenial,
This script is only known to work on Ubuntu Trusty and Xenial,
exiting. If you are interested in helping make installation possible
on other platforms, let us know.
......@@ -391,7 +387,7 @@ apt-get install -y software-properties-common python-software-properties
add-apt-repository -y ppa:git-core/ppa
# For older distributions we need to install a PPA for Python 2.7.10
if [[ "precise" = "$SHORT_DIST" || "trusty" = "$SHORT_DIST" ]]; then
if [[ "trusty" = "$SHORT_DIST" ]]; then
# Add python PPA
apt-key adv --keyserver "$EDX_PPA_KEY_SERVER" --recv-keys "$EDX_PPA_KEY_ID"
......@@ -427,12 +423,9 @@ pip install virtualenv=="$VIRTUAL_ENV_VERSION"
# python3 is required for certain other things
# (currently xqwatcher so it can run python2 and 3 grader code,
# but potentially more in the future). It's not available on Ubuntu 12.04,
# but in those cases we don't need it anyways.
if [[ -n "$(apt-cache search --names-only '^python3-pip$')" ]]; then
/usr/bin/apt-get update
/usr/bin/apt-get install -y python3-pip python3-dev
fi
# but potentially more in the future).
/usr/bin/apt-get update
/usr/bin/apt-get install -y python3-pip python3-dev
# this is missing on 14.04 (base package on 12.04)
# we need to do this on any build, since the above apt-get
......
......@@ -66,10 +66,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
......
......@@ -20,8 +20,8 @@ SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.box = "xenial64"
config.vm.box_url = "http://files.vagrantup.com/xenial64.box"
# Turn off shared folders
#config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
......
......@@ -65,10 +65,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
# Make LC_ALL default to en_US.UTF-8 instead of en_US.
......
......@@ -39,10 +39,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
# Make LC_ALL default to en_US.UTF-8 instead of en_US.
......
......@@ -7,8 +7,8 @@ CPU_COUNT = 2
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.box = "xenial64"
config.vm.box_url = "http://files.vagrantup.com/xenial64.box"
config.vm.network :private_network, ip: "192.168.33.20"
config.vm.network :forwarded_port, guest: 8080, host: 8080
......@@ -18,10 +18,6 @@ Vagrant.configure("2") do |config|
# You can adjust this to the amount of CPUs your system has available
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vm.provision :ansible do |ansible|
......
......@@ -4,8 +4,8 @@ CPU_COUNT = 2
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.box = "xenial64"
config.vm.box_url = "http://files.vagrantup.com/xenial64.box"
config.vm.network :private_network, ip: "192.168.33.20"
config.vm.network :forwarded_port, guest: 8080, host: 8080
......@@ -15,10 +15,6 @@ Vagrant.configure("2") do |config|
# You can adjust this to the amount of CPUs your system has available
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
end
config.vm.provision :ansible do |ansible|
......
......@@ -159,10 +159,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# Virtio is faster, but the box needs to have support for it. We didn't
# have support in the boxes before Ficus.
if !(boxname.include?("dogwood") || boxname.include?("eucalyptus"))
......
......@@ -160,10 +160,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# Virtio is faster, but the box needs to have support for it. We didn't
# have support in the boxes before Ficus.
if !(boxname.include?("dogwood") || boxname.include?("eucalyptus"))
......
Vagrant.require_version ">= 1.8.7"
unless Vagrant.has_plugin?("vagrant-hostupdater")
raise "Please install the vagrant-hostupdater plugin by running `vagrant plugin install vagrant-hostupdater`"
end
VAGRANTFILE_API_VERSION = "2"
......@@ -72,10 +75,6 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
vb.customize ["modifyvm", :id, "--memory", MEMORY.to_s]
vb.customize ["modifyvm", :id, "--cpus", CPU_COUNT.to_s]
# Allow DNS to work for Ubuntu 12.10 host
# http://askubuntu.com/questions/238040/how-do-i-fix-name-service-for-vagrant-client
vb.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
# Virtio is faster, but the box needs to have support for it. We didn't
# have support in the boxes before Ficus.
if !(boxname.include?("dogwood") || boxname.include?("eucalyptus"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment