-
Notifications
You must be signed in to change notification settings - Fork 12
LAB8_Verify and Deploy in Netlify
Objectives
In this step, we will:
- Merge our code back to master and verify production application deployment
We will cover:
Now it's time to merge ALL of the changes from the last 3 sections back to master. This will kick off an automated deploy to Netlify and get our changes ready for production.
📘 Commands to execute
git add functions/insertGame.js test/insertGame.test.js
git commit -m "Merging insertGame and insertGame.test.js into master"
git push
✔️ Once you've completed the push
command above go back to YOUR battlestax repository in Github and create a Pull Request to merge the changes into master. Use the same exact process we used in LAB2 to do this.
If you need a refresher go HERE and then come back here to finish your deployment.
✔️ When your new site is ready, you will be able to go to: <your_url>.netlify.app
to see your game. To find your URL, navigate to Deploys
in Netlify and click on the link provided via the UI.
✔️ Once clicked you should see a display like the following:
If you start new games it will create a new record in the database. If you want to validate this behavior click on START NEW GAME
.
✔️ Open Astra UI, show the CQL Console
and execute the following command (here battlestax is your keyspace and games your collection name - if you chose another names adapt the query accordingly).
📘 Command to execute
SELECT key, text_value FROM battlestax.games;
You should have a result that looks like the following image. If you see the game you just created in this list you know your application is properly hooked up to your database via the document API.
Alrighty, let's sum all this up. If you got to this point you have now deployed an application through a CI/CD pipeline with GitHub Actions using serverless functions that are globally available via Netlify all backed by the top NoSQL distributed database Apache Cassandra on DataStax Astra without ever touching a server, deploying back-end code, or needing to talk to your IT folks (no harm meant to my IT friends).
🏠 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