Add support for Ubuntu 19.04 Disco

This commit is contained in:
VirtuBox
2019-04-29 13:13:44 +02:00
parent 9de9ba8637
commit 7cf6d44086
5 changed files with 33 additions and 25 deletions

View File

@@ -37,6 +37,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
- Extplorer filemanager - Extplorer filemanager
- Enable OSCP Stapling with Let's Encrypt - Enable OSCP Stapling with Let's Encrypt
- Compress database backup with pigz before updating sites - Compress database backup with pigz before updating sites
- Add support for Ubuntu 19.04 disco
#### Changed #### Changed

View File

@@ -11,11 +11,14 @@
</p> </p>
<p align="center"> <p align="center">
<a href="https://travis-ci.org/WordOps/WordOps"><img src="https://travis-ci.org/WordOps/WordOps.svg?branch=master" alt="build"></a> <a href="https://travis-ci.org/WordOps/WordOps" target="_blank"><img src="https://travis-ci.org/WordOps/WordOps.svg?branch=master" alt="build"></a>
<img src="https://img.shields.io/github/license/wordops/wordops.svg" alt="MIT"> <img src="https://img.shields.io/github/license/wordops/wordops.svg" alt="MIT">
<img src="https://img.shields.io/github/last-commit/wordops/wordops.svg" alt="Commits"> <img src="https://img.shields.io/github/last-commit/wordops/wordops.svg" alt="Commits">
<img alt="GitHub release" src="https://img.shields.io/github/release/WordOps/WordOps.svg"> <img alt="GitHub release" src="https://img.shields.io/github/release-pre/WordOps/WordOps.svg">
<a href="https://www.codacy.com/app/VirtuBox/WordOps?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=WordOps/WordOps&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/fe9100fd2c634de7882ecec17f00a11a"/></a> <br><a href="https://www.codacy.com/app/VirtuBox/WordOps?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=WordOps/WordOps&amp;utm_campaign=Badge_Grade"><img src="https://api.codacy.com/project/badge/Grade/fe9100fd2c634de7882ecec17f00a11a"/></a>
<a href="https://twitter.com/WordOps_" target="_blank"><img src="https://img.shields.io/badge/twitter-%40WordOps__-blue.svg?style=flat&logo=twitter" alt="Badge Twitter" /></a>
<a href="https://community.wordops.net/slack" target="_blank"><img src="https://img.shields.io/badge/slack-WordOps-4A154B.svg?style=flat&logo=slack" alt="Badge Slack" /></a>
</p> </p>
<p align="center"> <p align="center">
@@ -27,10 +30,9 @@
<a href="#license">License</a> <a href="#license">License</a>
</p> </p>
<p align="center"> <p align="center">
<a href="https://wordops.net"> WordOps site</a> • <a href="https://wordops.net" target="_blank"> WordOps.net</a> •
<a href="https://docs.wordops.net">Documentation</a> • <a href="https://docs.wordops.net" target="_blank">Documentation</a> •
<a href="https://community.wordops.net">Community forum</a> <a href="https://community.wordops.net" target="_blank">Community forum</a>
<a href="https://community.wordops.io/slack">Slack</a>
</p> </p>
@@ -53,6 +55,7 @@
- Ubuntu 16.04 LTS (Xenial) - Ubuntu 16.04 LTS (Xenial)
- Ubuntu 18.04 LTS (Bionic) - Ubuntu 18.04 LTS (Bionic)
- Ubuntu 19.04 (Disco)
- Debian 8 (Jessie) - Debian 8 (Jessie)
- Debian 9 (Stretch) - Debian 9 (Stretch)

View File

@@ -139,9 +139,9 @@ if [ -z "$wo_force_install" ]; then
wo_lib_echo_fail "other Linux distributions and perhaps even Unix deratives." wo_lib_echo_fail "other Linux distributions and perhaps even Unix deratives."
exit 100 exit 100
else else
check_wo_linux_distro=$(lsb_release -sc | grep -E "trusty|xenial|bionic|jessie|stretch") check_wo_linux_distro=$(lsb_release -sc | grep -E "trusty|xenial|bionic|disco|jessie|stretch")
if [ -z "$check_wo_linux_distro" ]; then if [ -z "$check_wo_linux_distro" ]; then
wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 14.04/16.04/18.04, Debian 8.x and Debian 9.x" wo_lib_echo_fail "WordOps (wo) only supports Ubuntu 14.04/16.04/18.04/19.04 LTS, Debian 8.x and Debian 9.x"
exit 100 exit 100
fi fi
fi fi

View File

@@ -92,21 +92,22 @@ class WOStackController(CementBaseController):
"""Pre settings to do before installation packages""" """Pre settings to do before installation packages"""
if set(WOVariables.wo_mysql).issubset(set(apt_packages)): if set(WOVariables.wo_mysql).issubset(set(apt_packages)):
Log.info(self, "Adding repository for MySQL, please wait...") if (WOVariables.wo_platform_codename != 'disco'):
mysql_pref = ("Package: *\nPin: origin " Log.info(self, "Adding repository for MySQL, please wait...")
"sfo1.mirrors.digitalocean.com" mysql_pref = ("Package: *\nPin: origin "
"\nPin-Priority: 1000\n") "sfo1.mirrors.digitalocean.com"
with open('/etc/apt/preferences.d/' "\nPin-Priority: 1000\n")
'MariaDB.pref', 'w') as mysql_pref_file: with open('/etc/apt/preferences.d/'
mysql_pref_file.write(mysql_pref) 'MariaDB.pref', 'w') as mysql_pref_file:
WORepo.add(self, repo_url=WOVariables.wo_mysql_repo) mysql_pref_file.write(mysql_pref)
Log.debug(self, 'Adding key for {0}' WORepo.add(self, repo_url=WOVariables.wo_mysql_repo)
.format(WOVariables.wo_mysql_repo)) Log.debug(self, 'Adding key for {0}'
WORepo.add_key(self, '0xcbcb082a1bb943db', .format(WOVariables.wo_mysql_repo))
keyserver="keyserver.ubuntu.com") WORepo.add_key(self, '0xcbcb082a1bb943db',
WORepo.add_key(self, '0xF1656F24C74CD1D8', keyserver="keyserver.ubuntu.com")
keyserver="keyserver.ubuntu.com") WORepo.add_key(self, '0xF1656F24C74CD1D8',
chars = ''.join(random.sample(string.ascii_letters, 16)) keyserver="keyserver.ubuntu.com")
chars = ''.join(random.sample(string.ascii_letters, 24))
Log.debug(self, "Pre-seeding MySQL") Log.debug(self, "Pre-seeding MySQL")
Log.debug(self, "echo \"mariadb-server-10.3 " Log.debug(self, "echo \"mariadb-server-10.3 "
"mysql-server/root_password " "mysql-server/root_password "

View File

@@ -13,7 +13,7 @@ class WOVariables():
# WordOps version # WordOps version
wo_version = "3.9.5" wo_version = "3.9.5"
# WordOps packages versions # WordOps packages versions
wo_wp_cli = "2.1.0" wo_wp_cli = "2.2.0"
wo_adminer = "4.7.1" wo_adminer = "4.7.1"
# Get WPCLI path # Get WPCLI path
@@ -102,6 +102,9 @@ class WOVariables():
elif wo_platform_codename == 'bionic': elif wo_platform_codename == 'bionic':
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:" wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/virtubox:/WordOps/xUbuntu_18.04/ /") "/virtubox:/WordOps/xUbuntu_18.04/ /")
elif wo_platform_codename == 'disco':
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/virtubox:/WordOps/xUbuntu_19.04/ /")
elif wo_platform_codename == 'jessie': elif wo_platform_codename == 'jessie':
wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:" wo_nginx_repo = ("deb http://download.opensuse.org/repositories/home:"
"/virtubox:/WordOps/Debian_8.0/ /") "/virtubox:/WordOps/Debian_8.0/ /")