SlideShare a Scribd company logo
DevOps Workshop
Part 2 coming soon!
Todayʼs Agenda
● What is DevOps?
● What is CI/CD?
● How to implement CI/CD using GitHub Actions?
● A brief introduction to Firebase
● And much more!
By the end of it, you’ll have your own “DevOps-ified “
React/ Firebase project!
You can then edit the React App’s code and turn it into
your own thing (ex. Personal website, etc.)
So, what is DevOps?
● Set of cultural philosophies, practices, and tools that
increases an organization’s ability to deliver applications
and services at high velocity
● Primarily through automating and streamlining
development and infrastructure management processes
Benefits of DevOps
● Speed/Agility
● Rapid Deployment
● Quality and reliability
● Improved Collaboration
● And much more!
DevOps Best Practices
● Continuous Integration
● Continuous Delivery
● Microservices
● Infrastructure as Code
● Monitoring and Logging
● Communication and Collaboration
DevOps Best Practices
● Continuous Integration
● Continuous Delivery
● Microservices
● Infrastructure as Code
● Monitoring and Logging
● Communication and Collaboration
Note: Continuous Integration + Continuous Delivery referred to as “CI/CD”
● Pipeline: set of automated processes
○ Ex. Automatically testing your code, and then automatically
deploying them
Example
Your banking App
$ git push
Does app display
correct output for
account balance?
yes
Deploy the changes internet
(whether that be on your own
servers,Google’s Firebase servers,
etc)
How do we automate this? Aka how do we
implement CI/CD for our app?
Testing
How do we automate this?
● We call this process of automating particular parts of software
development “continuous integration, continuous delivery, and
continuous deployment (CI/CD for short)”
How do we automate this?
● Software/tools that allow us to implement CI/CD are:
○ GitHub Actions
○ Travis CI
○ Jenkins
○ etc.
GitHub Actions
● Service created by GitHub that we can use for CI/CD
● GitHub Actions makes it easy to automate all your software
workflows
● You can configure a GitHub Actions workflow to be
triggered when something happens in your repository
○ Ex. on a push to the repo, on a merge between two
branches, on every pull request etc.
How Github Actions work
1. Create a file that tells GitHub Actions what to do
a. needs to be a .yaml file that is placed in the .github/workflows/
directory
b. This file needs to conforms to the specific GitHub Action syntax
2. Specify when we want this script to run (ex. On a push to the main branch
of your GitHub repository)
3. Specify what you want the script to do when it is triggered
4. When this trigger is set off, GitHub will run this script on their servers!
How Github Actions work (lower level)
1. We create a .github/workflows/<something>.yaml in the root level
of our github repository
2. We specify when we want this script to run (ex. On a push to the
main branch)
3. We can optionally define in some environment variables that will
be available to use by the server running the script
4. We specify what the script should do
5. This script then gets run on one of GitHub’s many servers
Example
myProject/.github/workflows/my-action.yaml
DevOps Workshop Part 1
DevOps Workshop Part 1
You can name this job whatever you want
You can name this job whatever you want
Define these ‘secrets’ in
your GitHub repos
Settings -> Secrets
Secrets are basically encrypted variables that you can define for your github actions
repo so you don’t have to hardcode them in to your (possibly) publicly viewable
script
Define these ‘secrets’ in
your GitHub repos
Settings -> Secrets
See here for details
Secrets are basically encrypted variables that you can define for your github actions
repo so you don’t have to hardcode them in to your (possibly) publicly viewable
script
Define these ‘secrets’ in
your GitHub repos
Settings -> Secrets
● This is admittedly a pretty useless example of a
GitHub action (just writing some values to stdout)
● Later in the workshop we will see how we can
‘build’ a React app , test it, and deploy it to
Firebase.
Testing
● One action that is often included in CI/CD is automated testing
● Testing is important important
○ Frequent testing of your codebase allows your program to
be less prone to errors
○ This allows checking to make sure a new block of code
doesn’t break the previously written code
○ etc
Manual Testing
● This is done by a person (tester) without
using any automated tools
● This is often very expensive and time
consuming for a company
● Prone to human errors
● Any new application must be manually
tested before its testing can be
automated.
Automated Testing
● Done by a computer
● Extremely inexpensive and quick to run
■ Development of good tests suites can take time though!
● Might not be able to test certain things as well as a person
though
■ Ex. If your website has a lot of animations and want to test
to see if all of them look ok, you’re likely better off with
manual testing
Automated Testing: Types of Tests
● Unit Tests
○ Testing small ‘units’ of an application individually
○ For example, testing individual methods, functions, components or
modules
● Integration tests
○ Testing to see if your modules/components/functions/etc work
together
● Several other types of tests can be found here
Examples of each
● both doors likely work
individually (would be
verified by a unit test)
● but they clearly do
not work together
(would be verified by
a integration test)
Unit vs Integration Example
Letʼs see how tests look like in React!
Moving onto Firebase
Wait, whatʼs Firebase?
● Firebase is a platform developed by Google for creating mobile and web
applications.
● It abstracts away a lot of backend development for you
○ ex. you can get a website up and running with a single click without
having to do any back-end work
○ simplifies setting up and connecting your app to a database (called
Firestore)
○ Simplifies Authentication
○ And much more!
Firebase intro continued..
● We will just be focusing on the “web hosting” portion of
Firebase for this workshop
● Please let us know if you’d like to see a dedicated workshop on
Firebase!
● Let’s create a new firebase project!
Deploying React app on Firebase (~3 min)
1. FORK this repository (aka created your own copy of it) and
clone this forked repo onto your computer.
2. cd <name of this directory>
3. npm install firebase-tools -g
4. firebase login
a. Logs you in with your google account using the CLI
5. firebase init
a. Will prompt you with several questions (I’ll show you what
to select in next slide)
Answer the firebase init prompts as follows:
● Which Firebase CLI features do you want to set up for this folder?
→ Configure and deploy Firebase Hosting sites
● What project do you want to use? -> Use existing
○ And then select the project you just created
● What to use as public directory? → build
● Configure as single page app? -> Yes
● Set up automatic builds and deploys with GitHub? -> No
● Overwrite index.html? -> No
Firebase-ify an existing React project
build
Firebase-ify an existing React project
Firebase init result
○ You should see that firebase created some new files and directories
○ firebase json:
■ where you can specify various hosting rules for your app (ex. where
should firebase find all the files it will server users?)
○ .firebaserc:
■ - a file that contains info to identify your firebase project
Firebase init result
● To serve your project locally (through a web server running locally that listens
to port 5000 by default)
● npm install && npm run build (if you haven’t already)
● Followed by, firebase serve
● Note: only for windows users, please remove the “CI=false &&” part from line
17 of package.json if you want to run it locally. IMPORTANT: add it back once
you are ready to setup github actions for it.
● Note: if you get an 403 error when visiting localhost:5000,
Do this instead: firebase serve -o 0.0.0.0
Letʼs deploy to firebase
➔ Just execute the command (assuming you have ran npm run
build beforehand):
→ firebase deploy
● URL of your app will be outputted to you
● App is now live on the internet!
● Really easy, right?
Letʼs automate this with GitHub Actions!
Let’s head over to my computer!
For those revisiting the slides afterwards, the finished
GitHub actions file is here
Letʼs deploy to firebase (~1min)
● First thing we need is a “Firebase CI Token” to basically
authorize GitHub Actions to be able to interact with our
Firebase Project
● Run the following command in your terminal:
● firebase login:ci
This will prompt you to sign in using your browser and if successful
it will output a token in your terminal
Deploying to firebase cntd. (~2min)
● Follow these steps to add this token
as a ‘secret’ in your repository
○ Just think of a ‘secret’ as a
safe, secure variable that your
GitHub actions script can use
● To follow along with me (or to get
the finished GitHub Action file
working), name this secret
DEVOPS_1_FIREBASE_TOKEN
Deploying to firebase ctnd
● Here is an example of how you can access it in your GitHub
Actions script
● NEVER REVEAL THIS TOKEN PUBLICALLY (ex. Don’t hardcode
the actual value of the token in your github actions script)
Deploying to firebase ctnd
Let’s go over and explain what is happening in the deploy.yaml
script found here (don’t worry, the finished script is already on your
computer if you forked the workshop GitHub repository 😄)
GitHub Actions config
GitHub Actions config
● If you got everything done up to this point, try making a change
to the React code and pushing it to the repo (careful! Your
changes might break the automated tests I set up 😄 Try just
adding <h1>hello</h1> somewhere (that shouldn’t break
anything :) ) )
● If you click the “Actions” tab in the repository you should see
the Action running!
A final note
● You can run workflows manually by clicking “run workflow as
seen below
Thank you!
Any questions?
We have a React App
Create a firebase project
“Firebase-ify” our React project
We can deploy it manually by typing in: firebase deploy
We created a CI/CD pipeline using GitHub actions:
(Writing a script that GitHub ran on its servers)
THIS RAN ON EACH PUSH TO THE MAIN BRANCH IN OUR
GITHUB REPOSITORY
● Installed dependencies for the react app, Built the react
app, ran the tests
○ If any of the tests failed, the GitHub action would
stop running and tell us that something went wrong
● Deploy the firebase app to the internet
Ad

More Related Content

Similar to DevOps Workshop Part 1 (20)

DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
MinhTrnNht7
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & Salesforce
Abhinav Gupta
 
Github developing stack
Github developing stackGithub developing stack
Github developing stack
Vicente Bolea
 
Git hooks
Git hooksGit hooks
Git hooks
Skills Matter
 
Intro to Github Actions @likecoin
Intro to Github Actions @likecoinIntro to Github Actions @likecoin
Intro to Github Actions @likecoin
William Chong
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
Osama Mustafa
 
Heroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success storyHeroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success story
Jérémy Wimsingues
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
Untangling4
Untangling4Untangling4
Untangling4
Derek Jacoby
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)
alloy020
 
create_patch_file_v3a.pdf
create_patch_file_v3a.pdfcreate_patch_file_v3a.pdf
create_patch_file_v3a.pdf
vilaylala
 
Introduction to Github action Presentation
Introduction to Github action PresentationIntroduction to Github action Presentation
Introduction to Github action Presentation
Knoldus Inc.
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
Chris Caple
 
GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!
Orangescrum
 
Hack Rio/OS
Hack Rio/OSHack Rio/OS
Hack Rio/OS
Kishore Neelamegam
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
Martin Jinoch
 
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
LearnWeb Taiwan
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf
BOSC Tech Labs
 
Azure DevOfsdfsdfsfasfsdfasfsdfsdfsdps.pdf
Azure DevOfsdfsdfsfasfsdfasfsdfsdfsdps.pdfAzure DevOfsdfsdfsfasfsdfasfsdfsdfsdps.pdf
Azure DevOfsdfsdfsfasfsdfasfsdfsdfsdps.pdf
ManhHoangVan
 
La importancia de versionar el código: GitHub, portafolio y recursos para est...
La importancia de versionar el código: GitHub, portafolio y recursos para est...La importancia de versionar el código: GitHub, portafolio y recursos para est...
La importancia de versionar el código: GitHub, portafolio y recursos para est...
CloudNativeElSalvado
 
DevOps - Interview Question.pdf
DevOps - Interview Question.pdfDevOps - Interview Question.pdf
DevOps - Interview Question.pdf
MinhTrnNht7
 
Fun with Jenkins & Salesforce
Fun with Jenkins & SalesforceFun with Jenkins & Salesforce
Fun with Jenkins & Salesforce
Abhinav Gupta
 
Github developing stack
Github developing stackGithub developing stack
Github developing stack
Vicente Bolea
 
Intro to Github Actions @likecoin
Intro to Github Actions @likecoinIntro to Github Actions @likecoin
Intro to Github Actions @likecoin
William Chong
 
Using git hub for your code
Using git hub for your codeUsing git hub for your code
Using git hub for your code
Osama Mustafa
 
Heroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success storyHeroku to Kubernetes & Gihub to Gitlab success story
Heroku to Kubernetes & Gihub to Gitlab success story
Jérémy Wimsingues
 
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Continuous Integration with Open Source Tools - PHPUgFfm 2014-11-20
Michael Lihs
 
RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)RubyMotion Inspect Conference - 2013. (With speaker notes.)
RubyMotion Inspect Conference - 2013. (With speaker notes.)
alloy020
 
create_patch_file_v3a.pdf
create_patch_file_v3a.pdfcreate_patch_file_v3a.pdf
create_patch_file_v3a.pdf
vilaylala
 
Introduction to Github action Presentation
Introduction to Github action PresentationIntroduction to Github action Presentation
Introduction to Github action Presentation
Knoldus Inc.
 
Intro to Git for Drupal 7
Intro to Git for Drupal 7Intro to Git for Drupal 7
Intro to Git for Drupal 7
Chris Caple
 
GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!GitHub Integration for Orangescrum Cloud Released!
GitHub Integration for Orangescrum Cloud Released!
Orangescrum
 
BLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes DevelopersBLUG 2012 Version Control for Notes Developers
BLUG 2012 Version Control for Notes Developers
Martin Jinoch
 
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
Github Action 開始簡易入門 DevOps,自動化你的專案 (LearnWeb Taiwan Meetup #15)
LearnWeb Taiwan
 
3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf3 Ways to Get Started with a React App in 2024.pdf
3 Ways to Get Started with a React App in 2024.pdf
BOSC Tech Labs
 
Azure DevOfsdfsdfsfasfsdfasfsdfsdfsdps.pdf
Azure DevOfsdfsdfsfasfsdfasfsdfsdfsdps.pdfAzure DevOfsdfsdfsfasfsdfasfsdfsdfsdps.pdf
Azure DevOfsdfsdfsfasfsdfasfsdfsdfsdps.pdf
ManhHoangVan
 
La importancia de versionar el código: GitHub, portafolio y recursos para est...
La importancia de versionar el código: GitHub, portafolio y recursos para est...La importancia de versionar el código: GitHub, portafolio y recursos para est...
La importancia de versionar el código: GitHub, portafolio y recursos para est...
CloudNativeElSalvado
 

More from GDSC UofT Mississauga (20)

CSSC ML Workshop
CSSC ML WorkshopCSSC ML Workshop
CSSC ML Workshop
GDSC UofT Mississauga
 
ICCIT Council × GDSC: UX / UI and Figma
ICCIT Council × GDSC: UX / UI and FigmaICCIT Council × GDSC: UX / UI and Figma
ICCIT Council × GDSC: UX / UI and Figma
GDSC UofT Mississauga
 
Community Projects Info Session Fall 2023
Community Projects Info Session Fall 2023Community Projects Info Session Fall 2023
Community Projects Info Session Fall 2023
GDSC UofT Mississauga
 
GDSC x Deerhacks - Origami Workshop
GDSC x Deerhacks - Origami WorkshopGDSC x Deerhacks - Origami Workshop
GDSC x Deerhacks - Origami Workshop
GDSC UofT Mississauga
 
Reverse Engineering 101
Reverse Engineering 101Reverse Engineering 101
Reverse Engineering 101
GDSC UofT Mississauga
 
Michael's OWASP Juice Shop Workshop
Michael's OWASP Juice Shop WorkshopMichael's OWASP Juice Shop Workshop
Michael's OWASP Juice Shop Workshop
GDSC UofT Mississauga
 
MCSS × GDSC: Intro to Cybersecurity Workshop
MCSS × GDSC: Intro to Cybersecurity WorkshopMCSS × GDSC: Intro to Cybersecurity Workshop
MCSS × GDSC: Intro to Cybersecurity Workshop
GDSC UofT Mississauga
 
Basics of C
Basics of CBasics of C
Basics of C
GDSC UofT Mississauga
 
Discord Bot Workshop Slides
Discord Bot Workshop SlidesDiscord Bot Workshop Slides
Discord Bot Workshop Slides
GDSC UofT Mississauga
 
Web Scraping Workshop
Web Scraping WorkshopWeb Scraping Workshop
Web Scraping Workshop
GDSC UofT Mississauga
 
Devops Workshop
Devops WorkshopDevops Workshop
Devops Workshop
GDSC UofT Mississauga
 
Express
ExpressExpress
Express
GDSC UofT Mississauga
 
HTML_CSS_JS Workshop
HTML_CSS_JS WorkshopHTML_CSS_JS Workshop
HTML_CSS_JS Workshop
GDSC UofT Mississauga
 
Docker workshop GDSC_CSSC
Docker workshop GDSC_CSSCDocker workshop GDSC_CSSC
Docker workshop GDSC_CSSC
GDSC UofT Mississauga
 
Back-end (Flask_AWS)
Back-end (Flask_AWS)Back-end (Flask_AWS)
Back-end (Flask_AWS)
GDSC UofT Mississauga
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
GDSC UofT Mississauga
 
Git Init (Introduction to Git)
Git Init (Introduction to Git)Git Init (Introduction to Git)
Git Init (Introduction to Git)
GDSC UofT Mississauga
 
Database Workshop Slides
Database Workshop SlidesDatabase Workshop Slides
Database Workshop Slides
GDSC UofT Mississauga
 
ChatGPT General Meeting
ChatGPT General MeetingChatGPT General Meeting
ChatGPT General Meeting
GDSC UofT Mississauga
 
Elon & Twitter General Meeting
Elon & Twitter General MeetingElon & Twitter General Meeting
Elon & Twitter General Meeting
GDSC UofT Mississauga
 
ICCIT Council × GDSC: UX / UI and Figma
ICCIT Council × GDSC: UX / UI and FigmaICCIT Council × GDSC: UX / UI and Figma
ICCIT Council × GDSC: UX / UI and Figma
GDSC UofT Mississauga
 
Community Projects Info Session Fall 2023
Community Projects Info Session Fall 2023Community Projects Info Session Fall 2023
Community Projects Info Session Fall 2023
GDSC UofT Mississauga
 
MCSS × GDSC: Intro to Cybersecurity Workshop
MCSS × GDSC: Intro to Cybersecurity WorkshopMCSS × GDSC: Intro to Cybersecurity Workshop
MCSS × GDSC: Intro to Cybersecurity Workshop
GDSC UofT Mississauga
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
GDSC UofT Mississauga
 
Ad

Recently uploaded (20)

tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdfSAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
SAP Modernization: Maximizing the Value of Your SAP S/4HANA Migration.pdf
Precisely
 
Procurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptxProcurement Insights Cost To Value Guide.pptx
Procurement Insights Cost To Value Guide.pptx
Jon Hansen
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
#StandardsGoals for 2025: Standards & certification roundup - Tech Forum 2025
BookNet Canada
 
Cyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of securityCyber Awareness overview for 2025 month of security
Cyber Awareness overview for 2025 month of security
riccardosl1
 
Heap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and DeletionHeap, Types of Heap, Insertion and Deletion
Heap, Types of Heap, Insertion and Deletion
Jaydeep Kale
 
What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...What is Model Context Protocol(MCP) - The new technology for communication bw...
What is Model Context Protocol(MCP) - The new technology for communication bw...
Vishnu Singh Chundawat
 
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdfComplete Guide to Advanced Logistics Management Software in Riyadh.pdf
Complete Guide to Advanced Logistics Management Software in Riyadh.pdf
Software Company
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Electronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploitElectronic_Mail_Attacks-1-35.pdf by xploit
Electronic_Mail_Attacks-1-35.pdf by xploit
niftliyevhuseyn
 
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdfThe Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
The Evolution of Meme Coins A New Era for Digital Currency ppt.pdf
Abi john
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc Webinar: Consumer Expectations vs Corporate Realities on Data Broker...
TrustArc
 
How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?How Can I use the AI Hype in my Business Context?
How Can I use the AI Hype in my Business Context?
Daniel Lehner
 
Linux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdfLinux Professional Institute LPIC-1 Exam.pdf
Linux Professional Institute LPIC-1 Exam.pdf
RHCSA Guru
 
Mobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi ArabiaMobile App Development Company in Saudi Arabia
Mobile App Development Company in Saudi Arabia
Steve Jonas
 
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
AI Changes Everything – Talk at Cardiff Metropolitan University, 29th April 2...
Alan Dix
 
Ad

DevOps Workshop Part 1

  • 1. DevOps Workshop Part 2 coming soon!
  • 2. Todayʼs Agenda ● What is DevOps? ● What is CI/CD? ● How to implement CI/CD using GitHub Actions? ● A brief introduction to Firebase ● And much more!
  • 3. By the end of it, you’ll have your own “DevOps-ified “ React/ Firebase project! You can then edit the React App’s code and turn it into your own thing (ex. Personal website, etc.)
  • 4. So, what is DevOps? ● Set of cultural philosophies, practices, and tools that increases an organization’s ability to deliver applications and services at high velocity ● Primarily through automating and streamlining development and infrastructure management processes
  • 5. Benefits of DevOps ● Speed/Agility ● Rapid Deployment ● Quality and reliability ● Improved Collaboration ● And much more!
  • 6. DevOps Best Practices ● Continuous Integration ● Continuous Delivery ● Microservices ● Infrastructure as Code ● Monitoring and Logging ● Communication and Collaboration
  • 7. DevOps Best Practices ● Continuous Integration ● Continuous Delivery ● Microservices ● Infrastructure as Code ● Monitoring and Logging ● Communication and Collaboration Note: Continuous Integration + Continuous Delivery referred to as “CI/CD”
  • 8. ● Pipeline: set of automated processes ○ Ex. Automatically testing your code, and then automatically deploying them
  • 9. Example Your banking App $ git push Does app display correct output for account balance? yes Deploy the changes internet (whether that be on your own servers,Google’s Firebase servers, etc) How do we automate this? Aka how do we implement CI/CD for our app? Testing
  • 10. How do we automate this? ● We call this process of automating particular parts of software development “continuous integration, continuous delivery, and continuous deployment (CI/CD for short)”
  • 11. How do we automate this? ● Software/tools that allow us to implement CI/CD are: ○ GitHub Actions ○ Travis CI ○ Jenkins ○ etc.
  • 12. GitHub Actions ● Service created by GitHub that we can use for CI/CD ● GitHub Actions makes it easy to automate all your software workflows ● You can configure a GitHub Actions workflow to be triggered when something happens in your repository ○ Ex. on a push to the repo, on a merge between two branches, on every pull request etc.
  • 13. How Github Actions work 1. Create a file that tells GitHub Actions what to do a. needs to be a .yaml file that is placed in the .github/workflows/ directory b. This file needs to conforms to the specific GitHub Action syntax 2. Specify when we want this script to run (ex. On a push to the main branch of your GitHub repository) 3. Specify what you want the script to do when it is triggered 4. When this trigger is set off, GitHub will run this script on their servers!
  • 14. How Github Actions work (lower level) 1. We create a .github/workflows/<something>.yaml in the root level of our github repository 2. We specify when we want this script to run (ex. On a push to the main branch) 3. We can optionally define in some environment variables that will be available to use by the server running the script 4. We specify what the script should do 5. This script then gets run on one of GitHub’s many servers
  • 18. You can name this job whatever you want
  • 19. You can name this job whatever you want
  • 20. Define these ‘secrets’ in your GitHub repos Settings -> Secrets Secrets are basically encrypted variables that you can define for your github actions repo so you don’t have to hardcode them in to your (possibly) publicly viewable script
  • 21. Define these ‘secrets’ in your GitHub repos Settings -> Secrets See here for details Secrets are basically encrypted variables that you can define for your github actions repo so you don’t have to hardcode them in to your (possibly) publicly viewable script
  • 22. Define these ‘secrets’ in your GitHub repos Settings -> Secrets
  • 23. ● This is admittedly a pretty useless example of a GitHub action (just writing some values to stdout) ● Later in the workshop we will see how we can ‘build’ a React app , test it, and deploy it to Firebase.
  • 24. Testing ● One action that is often included in CI/CD is automated testing ● Testing is important important ○ Frequent testing of your codebase allows your program to be less prone to errors ○ This allows checking to make sure a new block of code doesn’t break the previously written code ○ etc
  • 25. Manual Testing ● This is done by a person (tester) without using any automated tools ● This is often very expensive and time consuming for a company ● Prone to human errors ● Any new application must be manually tested before its testing can be automated.
  • 26. Automated Testing ● Done by a computer ● Extremely inexpensive and quick to run ■ Development of good tests suites can take time though! ● Might not be able to test certain things as well as a person though ■ Ex. If your website has a lot of animations and want to test to see if all of them look ok, you’re likely better off with manual testing
  • 27. Automated Testing: Types of Tests ● Unit Tests ○ Testing small ‘units’ of an application individually ○ For example, testing individual methods, functions, components or modules ● Integration tests ○ Testing to see if your modules/components/functions/etc work together ● Several other types of tests can be found here
  • 28. Examples of each ● both doors likely work individually (would be verified by a unit test) ● but they clearly do not work together (would be verified by a integration test)
  • 30. Letʼs see how tests look like in React!
  • 32. Wait, whatʼs Firebase? ● Firebase is a platform developed by Google for creating mobile and web applications. ● It abstracts away a lot of backend development for you ○ ex. you can get a website up and running with a single click without having to do any back-end work ○ simplifies setting up and connecting your app to a database (called Firestore) ○ Simplifies Authentication ○ And much more!
  • 33. Firebase intro continued.. ● We will just be focusing on the “web hosting” portion of Firebase for this workshop ● Please let us know if you’d like to see a dedicated workshop on Firebase! ● Let’s create a new firebase project!
  • 34. Deploying React app on Firebase (~3 min) 1. FORK this repository (aka created your own copy of it) and clone this forked repo onto your computer. 2. cd <name of this directory> 3. npm install firebase-tools -g 4. firebase login a. Logs you in with your google account using the CLI 5. firebase init a. Will prompt you with several questions (I’ll show you what to select in next slide)
  • 35. Answer the firebase init prompts as follows: ● Which Firebase CLI features do you want to set up for this folder? → Configure and deploy Firebase Hosting sites ● What project do you want to use? -> Use existing ○ And then select the project you just created ● What to use as public directory? → build ● Configure as single page app? -> Yes ● Set up automatic builds and deploys with GitHub? -> No ● Overwrite index.html? -> No Firebase-ify an existing React project
  • 37. Firebase init result ○ You should see that firebase created some new files and directories ○ firebase json: ■ where you can specify various hosting rules for your app (ex. where should firebase find all the files it will server users?) ○ .firebaserc: ■ - a file that contains info to identify your firebase project
  • 38. Firebase init result ● To serve your project locally (through a web server running locally that listens to port 5000 by default) ● npm install && npm run build (if you haven’t already) ● Followed by, firebase serve ● Note: only for windows users, please remove the “CI=false &&” part from line 17 of package.json if you want to run it locally. IMPORTANT: add it back once you are ready to setup github actions for it. ● Note: if you get an 403 error when visiting localhost:5000, Do this instead: firebase serve -o 0.0.0.0
  • 39. Letʼs deploy to firebase ➔ Just execute the command (assuming you have ran npm run build beforehand): → firebase deploy ● URL of your app will be outputted to you ● App is now live on the internet! ● Really easy, right?
  • 40. Letʼs automate this with GitHub Actions! Let’s head over to my computer! For those revisiting the slides afterwards, the finished GitHub actions file is here
  • 41. Letʼs deploy to firebase (~1min) ● First thing we need is a “Firebase CI Token” to basically authorize GitHub Actions to be able to interact with our Firebase Project ● Run the following command in your terminal: ● firebase login:ci This will prompt you to sign in using your browser and if successful it will output a token in your terminal
  • 42. Deploying to firebase cntd. (~2min) ● Follow these steps to add this token as a ‘secret’ in your repository ○ Just think of a ‘secret’ as a safe, secure variable that your GitHub actions script can use ● To follow along with me (or to get the finished GitHub Action file working), name this secret DEVOPS_1_FIREBASE_TOKEN
  • 43. Deploying to firebase ctnd ● Here is an example of how you can access it in your GitHub Actions script ● NEVER REVEAL THIS TOKEN PUBLICALLY (ex. Don’t hardcode the actual value of the token in your github actions script)
  • 44. Deploying to firebase ctnd Let’s go over and explain what is happening in the deploy.yaml script found here (don’t worry, the finished script is already on your computer if you forked the workshop GitHub repository 😄)
  • 46. GitHub Actions config ● If you got everything done up to this point, try making a change to the React code and pushing it to the repo (careful! Your changes might break the automated tests I set up 😄 Try just adding <h1>hello</h1> somewhere (that shouldn’t break anything :) ) ) ● If you click the “Actions” tab in the repository you should see the Action running!
  • 47. A final note ● You can run workflows manually by clicking “run workflow as seen below
  • 49. We have a React App Create a firebase project “Firebase-ify” our React project We can deploy it manually by typing in: firebase deploy We created a CI/CD pipeline using GitHub actions: (Writing a script that GitHub ran on its servers) THIS RAN ON EACH PUSH TO THE MAIN BRANCH IN OUR GITHUB REPOSITORY ● Installed dependencies for the react app, Built the react app, ran the tests ○ If any of the tests failed, the GitHub action would stop running and tell us that something went wrong ● Deploy the firebase app to the internet