-
Notifications
You must be signed in to change notification settings - Fork 12
LAB1_Setup and deploy your first app
Once you get your tools and environment setup you'll be good to go, not just for this workshop, but for your own JAMStack applications moving forward. Just repeat the process for your own application repositories.
We're going to start with just the basics and then build up our capabilities from there.
We will cover:
The very first thing we want to do is create a copy of the BattleStax repository into YOUR GitHub account. This is important because as part of this workshop you will deploy the BattleStax application to production and will need your own repository to do so. To do this we will fork the DataStax-Academy/battlestax repo.
✅ Step 1a. Launch the BattleStax repo into another tab
This might seem like an odd step, but will allow you to keep your place in the instructions you are reading now until you move to the new repo. Scroll up on the GitHub repo page, Right-Click on the battlestax
repo name, and choose Open Link in New Tab
to launch it in a new tab:
✅ Step 1b. Use template to copy repository into YOUR GitHub account
✔ From the new tab you just launched, click on the Use this template
button up on the top right of the page.
✔ On the Create a new repository from battlestax dialog, choose the repository you wish to fork the repo to. This should be to one of YOUR personal GitHub orgs.
- Ensure to choose the
Public
option andinclude all branches
then click theCreate repository from template
button
It should only take a moment for GitHub to generate a new repository in your account.
✅ Step 1c. Navigate back to your place in the docs
✔ Once complete you should now have your own battlestax repo within YOUR account. Notice both the GitHub org is no longer DataStax-Examples
and the text generated from DataStax-Examples/battlestax
.
The org "SonicDMG" you see there is just the example I used from my personal account. You will see a different organization in your case.
✅ Step 2a. Setup a Netlify account
✔ Using the link HERE, sign up for a new account and follow Netlify's instructions to create a New Site from Git
(you must be logged in to see this option).
✔ Once signed in, you should land on the following page.
✅ Step 2b. Create a new site
✔ Move to the Sites
tab and Click the New site from git
button.
✔ On the new page select Github
and locate the proper repository in your github Account.
✔ After allowing the Netlify
application on Github select the BattleStax
repository.
✔ Use all of the defaults for Basic Build Settings
✅ Step 2c. Deploy your site
✔ Click Deploy Site
and once deployed copy the domain name of your new site from Netlify.
✔ We'll let that bake for a moment and move on to the next section. It will take Netlify a couple minutes to spin everything up. We'll come back to this interface in an upcoming section.
At this point, by creating a new site from GitHub in Netlify anytime you commit to master your site will automatically be deployed with a CI/CD pipeline. No servers needed. This is seriously powerful stuff and really gets at the core of what we're all good at, coding.
🏠 Home
Introduction to the JAMStack Why this is cool ? Introduction to Netlify Want to learn more ? 🛠️ II - Setup and deploy your first app
Create your BattleStax repository Setup Netlify account Summary 🛠️ III - Create your Astra instance
Register and Sign In to Astra Configure and create your database Activate Cassandra awesome 📚 IV - What can Netlify do for you
Build, Package, deploy, host Advanced features Netlify Functions Want to learn more 🛠️ V - Expose your "hello world" API
Setup your environment Make a serverless endpoint using Netlify functions Merge back to master Check your deployment in Netlify Summary 📚 VI - What are DataStax Astra and Stargate
Introduction to Astra Introduction to Stargate Want to know More 🛠️ VII - Set environment variables in your application
Creating the .env file Explore the API with HTTPie 🛠️ VIII - Set secrets in GitHub for CI/CD
Configure secrets in GitHub Verify your secrets How is this all working ? 🛠️ IX - Set environment variables in Netlify
Set environment variables in Netlify Verify your environment variables Summary 🛠️ X - Implement a CRUD Api in Astra
Creating the insertGame Netlify endpoint Connect to Astra Hook it all together Running TDD tests 🛠️ XI - Verify and Deploy in Netlify
Merge back to master Verify your deployment in Netlify Feel the enormity of your accomplishment Super secret full game option 📚 XII - Resources