- Workshop recording: https://vimeo.com/531093418
- Identifier: DOI 10.17605/OSF.IO/5KP4G
Things have gotten better: most projects know that getting new developers up to speed is important. We keep notes on the hard stuff. But, typing long lists of mysterious commands, and keeping track of all the details, is still something many of us expect of new collaborators. We can do better. Lando is one tool that can help.
Lando is a way to bootstrap a useable development environment. It's built on Docker, and is like Docker-Compose, but much more transparent. It handles the boring details and helps you actually start developing: with code in your favorite IDE, and all the services you need in Docker. It's all about making the life of a developer easier. It won't give you an application container you can deploy. But you will develop a deeper understanding of how all the pieces fit together. And you'll have a tool which can deploy those pieces to dev/stage/prod if you wish.
The first part of this session will be an introduction to Lando. We'll set up a MySQL database and play with it. We'll build an Omeka-S webapp as a sandbox. We'll build a Django project and app, and then kick off a debugger.
We'll end with some live coding: the entire group will collaborate on a Lando-based development environment for a project of our choosing.
After completing this workshop, attendees should come away able to use Lando to build a new development environment for any coding project.
The format of this workshop will be "keep up if you can", so following allong with the code is not necessary. However, if you do wish to follow along, here's what you'll need to do (preferrably before the day of the workshop).
- install Lando
- clone this project
- cd to the prep folder and run
lando rebuild
After step 3 is completed, you will have all the required software and Docker images downloaded, and you'll be ready to play on March 26.
Cool! Grab the slide deck (it's a work in progress) and skip to the "extra credit" slide which is towards the end. Or just go to the Lando 101 course and start following it.
You might also want to look at the Lando Cheat Sheet I made, it might come in handy.
There is a ton of great documentation on Lando, it's all worth reading.
Eh, it happens. Docker is a space hog. If you're done tinkering with Lando and/or want to slim down your Docker space usage, here are some commands that will throw away all the container images you've downloaded (which is safe, you'll be able to download them again if you need them):
docker system prune -af
docker rm $(docker ps -a -q)
docker rmi $(docker images -q -f dangling=true)
🛑 warning If you are in the process of creating a custom Docker image, don't run those commands above or you'll be sad.
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request :D
Much thanks are owed to the entire Lando community, for their continued support and for sharing such a great tool with the rest of us.
Thanks to MySQLtutorial.org for use of their sample database in exercise 1.