This repository has been archived by the owner on Dec 19, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit af91a4b
Showing
4 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# A MariaDB extension for Chassis | ||
The MariaDB extension automatically sets up your Chassis instance to be able to use MariaDB. | ||
|
||
## Activation | ||
Ensure you have a Chassis instance set up locally already. | ||
|
||
``` | ||
# In your Chassis dir: | ||
git clone --recursive https://github.com/Chassis/MariaDB.git extensions/mariadb | ||
``` | ||
|
||
Then you'll need to reprovision | ||
``` | ||
cd .. | ||
vagrant provision | ||
``` | ||
|
||
Alternatively you can add the extension to one of your yaml config files. e.g. | ||
``` | ||
# Extensions | ||
# | ||
# Install a list of extensions automatically | ||
extensions: | ||
- chassis/mariadb | ||
``` | ||
|
||
Then you'll need to reprovision | ||
|
||
``` | ||
cd .. | ||
vagrant provision | ||
``` | ||
|
||
MariaDB has now been installed inside your Chassis box. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Extension version. | ||
# | ||
# All modern extensions should use 2 here. Version 1 uses a chassis.pp | ||
# instead, which requires a deprecated feature of Puppet. | ||
# | ||
# Values: 2 | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
################################################################################ | ||
# | ||
# EXTENSION DEVELOPERS: | ||
# | ||
# chassis.pp is now deprecated with extensions v2. Extensions should instead | ||
# use Puppet modules: | ||
# | ||
# http://docs.chassis.io/en/latest/extend/#extensions-api-v2 | ||
# | ||
################################################################################ | ||
# | ||
# CHASSIS CORE DEVELOPERS: | ||
# | ||
# This file is required to ensure the `import extensions/*/chassis.pp` doesn't | ||
# fail for fresh checkouts (Puppet requires at least one file). | ||
# | ||
# Do not remove this file! | ||
# | ||
################################################################################ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
class mariadb ( | ||
$path = '/vagrant/extensions/mariadb', | ||
) { | ||
|
||
apt::source { 'mariadb': | ||
location => 'http://mirror.aarnet.edu.au/pub/MariaDB/repo/10.2/ubuntu', | ||
release => $::lsbdistcodename, | ||
repos => 'main', | ||
key => { | ||
id => '177F4010FE56CA3336300305F1656F24C74CD1D8', | ||
server => 'hkp://keyserver.ubuntu.com:80', | ||
}, | ||
include => { | ||
src => false, | ||
deb => true, | ||
}, | ||
} | ||
class { '::mysql::server': | ||
package_name => 'mariadb-server', | ||
package_ensure => 'latest', | ||
service_name => 'mysql', | ||
root_password => 'password', | ||
override_options => { | ||
mysqld => { | ||
'log-error' => '/var/log/mysql/mariadb.log', | ||
'pid-file' => '/var/run/mysqld/mysqld.pid', | ||
}, | ||
mysqld_safe => { | ||
'log-error' => '/var/log/mysql/mariadb.log', | ||
}, | ||
} | ||
} | ||
|
||
Apt::Source['mariadb'] ~> | ||
Class['apt::update'] -> | ||
Class['::mysql::server'] | ||
} |