This is a place for the information related to the upcoming Aiven workshop Configure your app and data for Continuous Delivery with Netlify.
The prerequisites for the workshop are (click on each to jump to the appropriate section):
- A GitHub account, and weâll be using git at the command line
- A suitable terminal window
- Sign up for an Aiven account - a Free Trial works excellently
- Install the
netlify
command, following the Netlify instructions, which requires Node.js. If youâre on a Mac, you can instead use âbrew install netlify-cli
â. - Fork the GitHub repository, and clone it to your machine
If you donât have a Netlify account, weâll show how to set that up in the workshop itself. (But if you want to skip ahead, the Netlify sign up page is here)
We discuss all of the other prerequisites in more detail below.
If you get stuck, please ask for help!
A GitHub account, and using git at the command line
Youâll need a GitHub account. See GitHubâs own Getting started with your GitHub account if you need to set one up.
Weâll be using a couple of git
commands at the command line, so youâll need git
installed. Again, GitHub have useful documentation on how to Install Git.
Alternatively, the git website has a âDownloadsâ page which links to instructions for Mac, Windows and Linux.
Weâll use the following git
commands:
git clone
git status
git add
git commit
git push
Weâll explain what weâre doing, and put the commands into the chat window so you can copy them
A terminal window and shell
Any shell where you can run git
commands should be OK. On Linux we would recommend bash
, on a Mac the default is zsh
, and on Windows either bash
(if youâre using the WSL) or PowerShell should work.
An Aiven account
Rather than get you to set up PostgreSQLÂŽ and RedisÂŽ* locally, or by some other means, weâre going to use Aiven for PostgreSQLÂŽ and Aiven for RedisÂŽ* on the Aiven platform.
In fact, for this workshop, our free versions of both of those are perfectly OK - and you can continue using them afterwards, too.
There are instructions at Creating an Aiven account
Install the netlify
command
OK, on this one there isnât actually any extra information.
If youâre on a Mac, you can use brew install netlify-cli
.
Otherwise, itâs best to follow the Netflify instructions, which require Node.js - basically they say to do:
npm install netlify-cli -g
Note If you are on Windows (either Ubuntu/WSL and PowerShell), after running npm install netlify-cli -g
you will need to add npm
to your PATH environment variable so that the terminal can find the netlify
command. See node.js - Node JS NPM modules installed but command not recognized - Stack Overflow for more information. (And thanks to Warwick_Allen for figuring this out.)
Fork the demo repository, and clone it
The workshop needs you to have made your own fork of the repository at GitHub - Aiven-Labs/nextjs-no-netlify: Recipe library built with Next.js, PostgreSQL and Redis, for workshop use, to have cloned it to the computer where youâre working, and then you also need to cd
into the cloned directory.
The GitHub page Fork a repo teaches all about forks and how to use them, much more than weâll need for this workshop. Note that you can choose whether youâre on Mac, Windows or Linux, and whether youâre using GitHub CLI (Command Line Interface), Desktop or Web browser.
Weâll summarise two ways to do it:
Fork using a web browser, then clone at the terminal
In this case, first go to your GitHub account, and make sure youâre logged in (if you forget this step, GitHub will ask you to login when you try to make the fork).
Then go to the repository we want to fork using your web browser. The top of the page should look like:
At the right of the page, you should see a âForkâ button:
Click on it, which should take you to the âCreate a forkâ page. Choose your GitHub user name under Owner:
You can update the name and description if you want, and then click on Create fork. That should take you to the page for your copy of the repository.
Now go to the Code button, and click on it to get download options. If youâve got SSH set up for your GitHub account, then the default SSH
is OK, but if youâre not sure, select HTTPS
. Then use the
to copy the URL.
Now, in your terminal window, clone the repository. With SSH that would look like the following (but with YOURUSER
replaced by your GitHub user name):
git clone git@github.com:YOURUSER/nextjs-no-netlify.git
and with HTTPS like:
git clone https://github.com/YOURUSER/nextjs-no-netlify.git
Once the repository has been downloaded, you can cd
into the new directory:
cd nextjs-no-netlify
and weâre ready for the workshop!
Use the gh
command line tool to fork and clone at the terminal
GitHub provide a command line tool called gh
, which can be used to do many GitHub operations at the command line. You can find out more about it at About GitHub CLI. Instructions on how to install it are on its own GitHub page - scroll down to find your operating system.
Once youâve installed gh
, you can fork and clone the nextjs-no-netlify
repository with one command as follows:
gh repo fork \
https://github.com/Aiven-Labs/nextjs-netlify.git \
--clone --remote
and then cd
into the new directory:
cd nextjs-no-netlify
and weâre ready for the workshop!