feat(upgrade): add info subcommand to display upgrade environment details
This commit is contained in:
2 files changed
+34
-2
No files matched your search
@@ -2309,6 +2309,7 @@ upgrade-odoo() {
|
||||
temp_folder="/var/tmp"
|
||||
|
||||
if [[ "$2" =~ "list" ]]; then
|
||||
echo "info"
|
||||
echo "all-test"
|
||||
echo "all-production"
|
||||
echo "dump"
|
||||
@@ -2338,6 +2339,37 @@ upgrade-odoo() {
|
||||
ssh_target_server="ssh -p $TARGET_PORT -J $TARGET_JUMP_HOST $TARGET_SERVER"
|
||||
fi
|
||||
|
||||
if [[ "$2" =~ "info" ]]; then
|
||||
echo ""
|
||||
echo "Source Enviroment"
|
||||
echo "-----------------"
|
||||
echo "Host: $HOST"
|
||||
echo "Server: $SERVER:$PORT"
|
||||
echo "Jump Host: $JUMP_HOST"
|
||||
echo "Odoo Container: $ODOO_CONTAINER"
|
||||
echo "Odoo Version: $ODOO_VERSION"
|
||||
echo "Postgres Container: $POSTGRES_CONTAINER"
|
||||
echo "Database: $DATABASE"
|
||||
echo ""
|
||||
echo "Target Enviroment"
|
||||
echo "-----------------"
|
||||
echo "Host: $TARGET_HOST"
|
||||
echo "Server: $TARGET_SERVER:$TARGET_PORT"
|
||||
echo "Jump Host: $TARGET_JUMP_HOST"
|
||||
echo "Odoo Container: $TARGET_ODOO_CONTAINER"
|
||||
echo "Odoo Version: $TARGET_ODOO_VERSION"
|
||||
echo "Postgres Container: $TARGET_POSTGRES_CONTAINER"
|
||||
echo "Database: $TARGET_DATABASE"
|
||||
echo ""
|
||||
echo "Upgrade Configuration"
|
||||
echo "---------------------"
|
||||
echo "Init Addons: $ODOO_ADDONS_INIT"
|
||||
echo "Uninstall Addons: $ODOO_ADDONS_UNINSTALL"
|
||||
echo "Test Config: $ODOO_CONFIGURE_TEST"
|
||||
echo "Production Config: $ODOO_CONFIGURE_PRODUCTION"
|
||||
echo ""
|
||||
fi
|
||||
|
||||
if [[ "$2" =~ "dump" ]]; then
|
||||
log-warning "Run step 'dump' on $SERVER."
|
||||
|
||||
|
||||
+2
-2
@@ -38,6 +38,7 @@ Update the configs with the definition of your enviroment.
|
||||
- `HOST`: Hostname of the Odoo pruction instance
|
||||
- `SERVER`: SSH url to access the pruction server
|
||||
- `PORT`: SSH port of server
|
||||
- `JUMP_HOST`: SSH jump host
|
||||
- `ODOO_CONTAINER`: Name of production Odoo Docker container
|
||||
- `ODOO_VERSION`: Version of Odoo production
|
||||
- `POSTGRES_CONTAINER`: Name of production Postgres Docker container
|
||||
@@ -45,6 +46,7 @@ Update the configs with the definition of your enviroment.
|
||||
- `TARGET_HOST`: Hostname of the Odoo upgrade instance.
|
||||
- `TARGET_SERVER`: SSH url to access the upgrade server
|
||||
- `TARGET_PORT`: SSH port of server
|
||||
- `TARGET_JUMP_HOST`: SSH jump host
|
||||
- `TARGET_ODOO_CONTAINER`: Name of upgrade Odoo Docker container
|
||||
- `TARGET_ODOO_VERSION`: Version of Odoo upgrade
|
||||
- `TARGET_POSTGRES_CONTAINER`: Name of upgrade Postgres Docker container
|
||||
@@ -72,8 +74,6 @@ TARGET_DATABASE='upgrade'
|
||||
|
||||
Note that the `HOST` and `TARGET_HOST` is a reference to another dotfile.
|
||||
|
||||
There is also `JUMP_HOST` and `TARGET_JUMP_HOST` to define the SSH jump host.
|
||||
|
||||
### Helper Scripts
|
||||
|
||||
Running the upgrade requires scripts on the servers. Ensure that the following scripts are installed on the server:
|
||||
|
||||
Reference in new issue
Block a user