-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
flatten bundled files for GH release
- Loading branch information
Showing
17 changed files
with
239 additions
and
28 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
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/bin/ | ||
/__bundle__/ | ||
*tmp | ||
.tmp* | ||
*.gz |
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
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
This file was deleted.
Oops, something went wrong.
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,5 @@ | ||
mageops::__module__() { | ||
lib::import mageops::core | ||
lib::import mageops::bootstrap | ||
lib::import mageops::ansible | ||
} |
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,30 @@ | ||
mageops::ansible::__module__() { | ||
lib::import mageops::core | ||
|
||
export ANSIBLE_FORCE_COLOR="yes" | ||
|
||
mageops::ansible::virtualenv::install() { | ||
} | ||
|
||
mageops::ansible::virtualenv::activate() { | ||
} | ||
|
||
mageops::ansible::virtualenv::update() { | ||
} | ||
|
||
mageops::ansible::playbook() { | ||
local PLAYBOOK="$1"; shift | ||
|
||
mageops::ansible::virtualenv::activate | ||
|
||
pushd "$MAGEOPS_ANSIBLE_DIR" | ||
|
||
ansible-playbook \ | ||
-i inventory/raccoon.yml \ | ||
--limit raccoon_local \ | ||
"$@" \ | ||
"${PLAYBOOK}.yml" | ||
|
||
popd | ||
} | ||
} |
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,57 @@ | ||
mageops::bootstrap::__module__() | ||
lib::import ui | ||
lib::import mageops::core | ||
lib::import mageops::ansible | ||
|
||
mageops::bootstrap::project-vars-install() { | ||
|
||
} | ||
|
||
mageops::bootstrap::install() { | ||
chmod +x $MAGEOPS_ROOT/bin/* | ||
|
||
ln -snvf \ | ||
$MAGEOPS_ROOT/bin/* \ | ||
/usr/local/bin/ | ||
|
||
mkdir -pv \ | ||
$MAGEOPS_ROOT/ansible | ||
|
||
git clone \ | ||
--depth 5 \ | ||
--single-branch \ | ||
--branch "${MAGEOPS_ANSIBLE_BRANCH}" \ | ||
https://github.com/mageops/ansible-infrastructure.git \ | ||
$MAGEOPS_ROOT/ansible/infrastructure | ||
|
||
git clone \ | ||
https://github.com/mageops/ansible-infrastructure-vars.git \ | ||
$MAGEOPS_ROOT/ansible/infrastructure-vars | ||
|
||
mkdir -pv \ | ||
$MAGEOPS_ROOT/ansible/infrastructure/vars/global \ | ||
$MAGEOPS_ROOT/ansible/infrastructure/vars/local \ | ||
$MAGEOPS_ROOT/ansible/infrastructure/vars/project \ | ||
$MAGEOPS_ROOT/ansible/infrastructure/tmp | ||
|
||
rm -rf \ | ||
$MAGEOPS_ROOT/ansible/infrastructure/vars/project/ | ||
|
||
ln -snvf \ | ||
$MAGEOPS_ROOT/ansible/infrastructure-vars/project-raccoon/ \ | ||
$MAGEOPS_ROOT/ansible/infrastructure/vars/project | ||
|
||
virtualenv-3 $MAGEOPS_ROOT/ansible/virtualenv | ||
|
||
source $MAGEOPS_ROOT/ansible/virtualenv/bin/activate | ||
|
||
pip install \ | ||
-r $MAGEOPS_ROOT/ansible/infrastructure/requirements-python.txt | ||
|
||
ansible-galaxy install \ | ||
-r $MAGEOPS_ROOT/ansible/infrastructure/requirements-galaxy.yml \ | ||
-p $MAGEOPS_ROOT/ansible/infrastructure/roles | ||
|
||
mkdir -p $MAGEOPS_ROOT/ansible/bin | ||
} | ||
} |
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,16 @@ | ||
mageops::core::__module__() { | ||
export MAGEOPS_PREFIX="${MAGEOPS_PREFIX:-/opt/mageops}" | ||
|
||
export MAGEOPS_ANSIBLE_ROOT_DIR="${MAGEOPS_PREFIX}/ansible" | ||
export MAGEOPS_ANSIBLE_VENV_DIR="${MAGEOPS_ANSIBLE_ROOT_DIR}/virtualenv" | ||
|
||
export MAGEOPS_ANSIBLE_REPO="https://github.com/mageops/ansible-infrastructure.git" | ||
export MAGEOPS_ANSIBLE_BRANCH="${MAGEOPS_ANSIBLE_BRANCH:-master}" | ||
export MAGEOPS_ANSIBLE_INVENTORY="${MAGEOPS_ANSIBLE_INVENTORY:-inventory/raccoon.yml}" | ||
|
||
export MAGEOPS_ANSIBLE_DIR="${MAGEOPS_ANSIBLE_ROOT_DIR}/infrastructure" | ||
export MAGEOPS_ANSIBLE_TMP_DIR="${MAGEOPS_ANSIBLE_DIR}/tmp" | ||
export MAGEOPS_ANSIBLE_VARS_DIR="${MAGEOPS_ANSIBLE_DIR}/vars" | ||
export MAGEOPS_ANSIBLE_VARS_PROJECT_DIR="${MAGEOPS_ANSIBLE_VARS_DIR}/project" | ||
export MAGEOPS_ANSIBLE_VARS_GLOBAL_DIR="${MAGEOPS_ANSIBLE_VARS_DIR}/global" | ||
} |
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,4 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
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,8 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
MAGEOPS_ROOT="${MAGEOPS_ROOT:-/opt/mageops}" | ||
|
||
. $MAGEOPS_ROOT/ansible/virtualenv/bin/activate | ||
|
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,23 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
MAGEOPS_ROOT="${MAGEOPS_ROOT:-/opt/mageops}" | ||
|
||
parse_vars() { | ||
for var in "$@" ; do | ||
echo "--extra-vars '$var'" | ||
done | ||
} | ||
|
||
if [ $# -lt 1 ] ; then | ||
echo "Usage: $0 cmd,cmd2,... extra_var=value extra_var2=value2 ..." >&2 | ||
exit 1 | ||
fi | ||
|
||
CMD="$1"; shift | ||
|
||
$MAGEOPS_ROOT/bin/mageops-playbook \ | ||
raccoon.cmd \ | ||
--extra-vars "raccoon_cmd=$CMD" \ | ||
`parse_vars "$@"` |
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,30 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
|
||
|
||
yum -y clean all || true | ||
dnf -y clean all || true | ||
|
||
systemctl stop php-fpm | ||
systemctl stop varnish | ||
systemctl stop elasticsearch | ||
systemctl stop nginx | ||
systemctl stop mysql | ||
systemctl stop redis | ||
systemctl stop redis-sessions | ||
systemctl stop elasticsearch | ||
|
||
rm -rvf \ | ||
/{root,home/magento}/{.cache/*,.opcache/*,.*history,.composer,.yarn/*,.npm/*} \ | ||
/var/lib/mysql/ib_logfile* \ | ||
/var/lib/mysql/ib_tmp* \ | ||
/var/lib/varnish/* \ | ||
/var/lib/redis/* \ | ||
/var/lib/redis-sessions/* | ||
|
||
echo '' | find /var/log -type f -exec tee {} \; | ||
echo '' | find /var/www/magento/ -mindepth 3 -type f -path '*/var/log/*' -exec tee {} \; | ||
|
||
|
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,31 @@ | ||
#!/usr/bin/env bash | ||
|
||
set -ex | ||
|
||
git-update() { | ||
git fetch | ||
git pull \ | ||
|| ( git stash && git pull && git stash pop ) \ | ||
|| git reset --hard "$(git rev-parse --abbrev-ref --symbolic-full-name @{u})" | ||
git -c color.ui=always --no-pager log -1 | ||
} | ||
|
||
MAGEOPS_ROOT="${MAGEOPS_ROOT:-/opt/mageops}" | ||
|
||
cd $MAGEOPS_ROOT/ansible/infrastructure && git-update | ||
cd $MAGEOPS_ROOT/ansible/infrastructure/vars/project && git-update | ||
|
||
source $MAGEOPS_ROOT/ansible/virtualenv/bin/activate | ||
|
||
pip install \ | ||
-r $MAGEOPS_ROOT/ansible/infrastructure/requirements-python.txt | ||
|
||
ansible-galaxy install \ | ||
-r $MAGEOPS_ROOT/ansible/infrastructure/requirements-galaxy.yml \ | ||
-p $MAGEOPS_ROOT/ansible/infrastructure/roles | ||
|
||
|
||
|
||
|
||
|
||
|
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,3 @@ | ||
raccoon::core::__module__() { | ||
|
||
} |
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,4 @@ | ||
raccoon::host::__module__() { | ||
lib::import raccoon::core | ||
lib::import raccoon::host::migrate | ||
} |
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