Drupal Starshot, DDEV, and Setting up a Demo
As I wrote in my recent post The Challenges of a Tech Talk , I am working on a tech talk to demonstrate ways to implement search on a Drupal 10 site. My plan is also to present about the challenges of presenting on a Drupal 10 topic. Can I make it interesting to both technical and non-technical people? Should I take a chance and use the brand new Drupal Starshot for my demo? There are probably people out there who want to learn more about setting up one’s local using software such as DDEV, so that could certainly be part of the talk. The planning of a talk with thought processing, experimentation, and mastering of a skill would be of interest to any professional, tech or otherwise.
What is Drupal Starshot? Why would I want to use it for my demo? This is from the Drupal Starshot definition:
“Starshot aims to build the new default download of Drupal. A package built on Drupal core, including refined common features from the contributed project ecosystem to create a great user experience out of the box… The result of Starshot will be a fast-moving Open Source product that enables site builders without Drupal experience to easily create a new Drupal site and extend it with pre-packaged recipes, all using their browser. “
I like the idea of using it for the demo because it is new, easier to set up than standard Drupal, and the site I plan to build will be one that common people use. I also love the clean look.
I went to the Drupal Starshot Slack channel and asked: “I am brand new to Starshot. I am planning to do a tech talk soon, and I need a Drupal instance. Can I use Starshot? I believe I just need content types and views and the usual twig files for my demo. I really like the automated updates part.” I got this response from phenaproxima (who I later found out is the main developer of Starshot):
“You could use the prototype. I don’t think it has auto-updates turned on by default.”
So I went to https://github.com/phenaproxima/starshot-prototype as suggested, and I learned to start up starshot I could use:
ddev quick-start
Great! Or so I think. Learning two systems (DDEV and Starshot) at once can get rather confusing. I am using my Linux laptop, and I had to set up DDEV for the first time on that system. I got a series of errors, such as No route found for "GET https://starshot.ddev.site/"
and a complaint about port 80 already being use. I figured out how to switch temporarily to another port, and with that switch I managed to get to an installation screen. I went through a few screens and got yet another error: "Error: Class "Drupal\geocoder\Entity\GeocoderProvider" not found in starshot_installer_configure_geocoder() (line 122 of profiles/contrib/starshot_installer/starshot_installer.profile)."
It turns out my errors were not related to Starshot. Instead they were DDEV setup issues.
How did I find this out? One has to do a little sleuthing. Maybe I needed a rebuild? I have been working with Lando for several years now, and when I have an issue, I often type: lando rebuild -y
and often this helps. So how do I do this with DDEV? I go to the DDEV Slack channel and ask: “Simple question for a ddev newbie: what is the equivalent of lando rebuild -y
? 100 replies or so later and a great deal of help from Randy Fay, I learn that Apache is running on my Linux laptop and occupying port 80. Randy suggested that I turn off Apache with sudo systemctl stop apache2 && sudo systemctl disable apache2
— after that, I was able to use port 80.
If you want to set the ports to other ports, one can use:
ddev config global --router-http-port=8080 --router-https-port=8443
And once I turned off Apache, I could again set the global to:
ddev config global --router-http-port=80 --router-https-port=443
With Randy Fay’s encouragement, I first set up the Drupal 10 quickstart. If you already familiar with Drupal and building sites on your local, it is easy to follow. By the way, to rebuild a DDEV site type: `ddev restart`. In my case the port issue was really the fix. The documentation for DDEV is clear for many issues, but sometimes when one is stuck, it helps a lot to get clear and concise answers. So far, the DDEV Slack channel has been responsive. Thank you so much to Randy Fay!
I got both a Drupal 10 site running and a Drupal Starshot site running. So far, I have created some content, a new content type, some taxonomy, and a view in the Drupal 10 site. My next challenge is to get similar content into the Drupal Starshot site and compare the two. The configuration for Starshot is different than that of Drupal 10. For example, the default content types in Drupal 10 are article and page. In Starshot we are given blog, event, and page. And the configuration fields are different, so I cannot just pull in a new content type via Import Single Configuration Item. Maybe I will write a migration? According to Gábor Hojtsy: “We don’t have a dedicated import solution for Starshot currently.”
For now I will take in the lesson that it is not so good to take on too much all at once. I will start my journey with a standard, vanilla Drupal 10 site.