Everything You Need to Know about Local Development for Magento Commerce Cloud

From Adobe:

Keith Bentrup, Magento, an Adobe Company
Matt Johnson, Magento, an Adobe Company
Oleh Posyniak, Magento, an Adobe Company
Yevhenii Pyltiai, Magento, an Adobe Company

This year at Magento Imagine 2019 Adobe held a session what was about practicing and demonstrating how quick and easy it is to start Magento Cloud on developer’s local environment from scratch using docker

The guys from Adobe (the Magento company) were great and very helpful. This session was really about getting up a Magento Cloud on local and that is it. But actually, the magic is that you can get it all done with a few commands while enjoying a coffee during the downloads. The whole session had an issue with the download (git clone…) because 50 people at the very same time tried to get it. Luckily Github didn’t recognise us as an attack but it was very slow. But let me tell you I was very happy with this “issue” there because the session turned into a real life situation when you have a problem and you have to resolve that. All my respect for the Adobe guys there, it wasn't simple to handle this. Thumbs up Guys. 🙂
I want to highlight why I like ITEGRATION as a Magento Solution Partner. The CTO himself  joined me at the session and he did it perfectly. I mean if you need an expert team then ITEGRATION is your team.

Magento Commerce (Cloud) ECE Deployment Tools

Github: http://github.com/magento/ece-tools
Magento has published their ECE Tools not long ago so check it out if you didn't do that yet. ECE-Tools now is an open source script library top on docker specifically for Magento Cloud. This tool is amazing guys, makes most of the job. Less hand work and less pain! Crucial if you are dealing with Magento Cloud! This tool drives your deployment process and helps you to keep the best practices! Check it out. They have Slack (#cloud) channel and DevDoc as well. It was fun to get up Magento Cloud on my local and I have to tell you the very first page load was fast as well. Actually very fast. Not much surprise there but I love to see Magento Cloud in action anytime. When you see it in action you will understand what your business needs. Our Magento experts are already working on Magento Express packages where we put  together the best combination of cost and performance based on the Magento Opensource version. If you are interested then please contact us here.

Magento Commerce (Cloud) Deployment Demo Steps

Might you will found useful a list of commands what we have been using at the session.
composer config http-basic.repo.magento.com YOUR_PUBLIC_KEY YOUR_PRIVATE_KEY
composer config github-oauth.github.com YOUR_TOKEN

# Adjust hosts
echo " magento2.docker" | sudo tee -a /etc/hosts

# Stop Apache
sudo apachectl stop

# Clone template
git clone https://github.com/magento/magento-cloud --branch imagine-demo

# Build compose file
./vendor/bin/ece-tools docker:build
./vendor/bin/ece-tools docker:build --mode developer

# Install module
composer config minimum-stability dev
composer config repositories.demo git git@github.com:shiftedreality/module-imagine-docker-demo.git
composer require magento/module-demo

# Enable module
docker-compose run deploy magento-command module:enable --all
docker-compose run deploy magento-command setup:upgrade

# Deploy in Dev mode
docker-compose up -d
docker-compose run deploy cloud-deploy
docker-compose run deploy magento-command deploy:mode:set developer
docker-compose run deploy magento-command config:set system/full_page_cache/caching_application 2 --lock-env
docker-compose run deploy magento-command cache:clean

# Deploy in Prod mode
docker-compose up -d
docker-compose run build cloud-build
docker-compose run deploy cloud-deploy
docker-compose run deploy magento-command config:set system/full_page_cache/caching_application 2 --lock-env
docker-compose run deploy magento-command cache:clean
Hope you enjoyed it, please give a thumbs up. Have a great day, Zsolt Szalay