Repository URL to install this package:
|
Version:
2.2.2 ▾
|
| bin |
| src |
| templates |
| vendor |
| .gitignore |
| README.md |
| composer.json |
| composer.lock |
| melt-deploy.sh |
| melt-pull-db.sh |
| melt-pull-files.sh |
| melt-push-db.sh |
| melt-push-files.sh |
melt Console is a command line utility that leverages the wonderful Symfony Console. It offers quite a few commands to help developers interact with the remote server.
We created meltconsole as a public package stored on Gemfury so we could leverage composer to install it as a dependency for our projects.
composer.json
composer config repositories.meltmedia composer https://php.fury.io/meltmedia/
composer require meltmedia/meltconsole
development.pem file added to your ~/.ssh/ directory. See https://confluence.meltdev.com/display/CP/Development+Server+SSH+Keymelt:setup-local meltconsole command
vendor/bin/meltconsole melt:setup-local
This will create a .lando.local.yml file that will contains configuration that meltconsole uses. This file should be added to the .gitignore. It also creates a .lando.base.yml yml file that contains some global defaults.The following steps in this section require it be done on the server.
Log into the server and run
composer global config repositories.meltmedia composer https://php.fury.io/meltmedia/
composer global require meltmedia/meltconsole
To update meltconsole after it's installed globally, run:
composer global update meltmedia/meltconsole
~/.bash_profileTop secret credentials should be stored in environment variables and not committed to git. Here are the current environment variables that melt console uses:
export MELT_DB_USER=''
export MELT_DB_PASS=''
export MELT_ENV='aws'
.meltconsole directory@TODO
Alias: melt:ce
If you've used Pantheon before, this option is similar to their multi-dev environment feature. This allows developers to spin up a new environment in isolation from other environments so they don't have to worry breaking prod.
Some common environments are dev, qa, stage, or uat, however you can name them whatever you want.
Example
lando meltconsole melt:ce --env=dev
If you don't pass the --env flag, you will be prompted to enter an environment name.
Alias: melt:re
Just as easy as it is to create an environment, it's as easy to remove an environment with this command. T
Example
lando meltconsole melt:re --env=pr25
If you don't pass the --env flag, you will be prompted to enter an environment name.
Alias: melt:sl
Generates the following files:
.lando.base.yml.lando.local.yml (add to .gitignore file)docroot/sites/default/settings/local.settings.php (add to .gitignore file)Alias: melt:ss
This command is ONLY ran on the server. It creates nginx config files and generates an SSL certificate using LetsEncrypt.
Alias: melt:pulld
Pulls database from remote environment to local.
@TODO
Alias: melt:pullf
Pulls files from remote environment to local
@TODO
Alias: melt:dc
Deploys code to remote environment
New commands can be created by adding new classes to the src/App/Commands directory. All commands SHOULD extend the MeltCommand.php class because it contains a bunch of different helper methods. After the class has been created, you'll need to instantiate the command in the bin/meltconsole file. e.g.:
use MeltConsole\App\Commands\AwesomeNewCommand;
$app->add(new AwesomeNewCommand());
To add/update/delete features for meltconsole, the code is stored under meltmedia's gemfury account. If you don't have a gemfury account, ask one of our devops peeps to add you. After that:
git remote add fury https://git.fury.io/meltmedia/meltconsole.git
git push fury master
v1.0.0 and we need to update the version to v1.1.0, we run:
git tag -a v1.1.0 -m="v1.0.0"
git push fury v1.1.0
You may be wondering, why are the dependencies for meltconsole in a suggest object rather than using the require. Well because, we're using the latest version of Symfony v4 whereas Drupal is using v3. We run into conflicts when running composer install since Drupal 8 requires v3. This a temporary fix for now.