Skip to main content

Create, Build, Configure and Deploy - Certification 1

What you’ll learn

  • How to create applications, components and environments.
  • How to build a component, how to configure and deploy an application to a chosen environment.

Prerequisites

Introduction

  • CodeNOW DOCS is available on docs.codenow.com.
  • Ask our support team for help. Use the Support button in the CodeNOW.

Task 1 - Create an Environment

  1. Create environment named <dev>-<YourLastName>, for example: dev-Smith.
  2. Create environment named <test>-<YourLastName>, for example: test-Smith.
FAQ

Task 2 - Create an Application

  1. Create application named testapp-<YourLastName>(for example: testapp-Smith). Set production environment setup to none.
FAQ
  • Q: What is an Application in the CodeNOW platform?
    • A1: An Application consists of one or more components. Each component represents a microservice.
    • A2: An Application in the microservice architecture is described by application components and their orchestration.

Task 3 - Create a Component

  1. Create a Front-end Component
    • Name: frontend-component-<YourLastName>, for example: frontend-component-Smith
    • Stack: JavaScript, NPM and React
  2. Create an API Component
    • Name: api-component-<YourLastName>, for example: api-component-Smith.
    • Stack: C# v9, Nuget, and .NET
FAQ
  • Q: What is a Component?
    • An application in the microservices architecture is described by the application components and their orchestration.
    • Components (microservices) encapsulate specific application logic (i.e. user details, billing, shipping, etc.).
    • Application components have release cycles and separate Git repositories!
  • Q: Where you can find Git repo address? Which credentials should I use?

Task 4 - Build a Component

  1. Build the frontend-component-<YourLastName>

    • Release Build, version 1.0.0
  2. Build the api-component-<YourLastName>

    • Release Build, version 1.0.0
  3. Create a new Git branch buildFailTest in the api-component-<YourLastName> Git repository.

  4. Insert several random strings to Api.Component.<YourLastName>/Controllers/HelloWorldController.cs file in the buildFailTest branch. This should cause a failed build.

  5. Commit the changes into the buildFailTest branch.

  6. Build a new version of the api-component-<YourLastName> from the branch buildFailTest

    • Use Release Build and create a version 1.0.1
    • Build should fail due to changes done in step 4. If the build does not fail, repeat the steps 4-6 until the build fails.
  7. Find the details about the failed build (and create a screen capture for a later check).

FAQ
  • Q: How are software versions numbered ?
  • Q: What is the difference between a Preview and a Release build?
  • Q: What is the main reason for using a Preview build?
  • Q: SonarQube: What is it?
  • Q: What is a Static Analysis?
    • A: Static analysis, also called static code analysis, is a method of computer program debugging that is done by examining the code without executing the program. The process provides an understanding of the code structure and can help ensure that the code adheres to industry standards. Static analysis is used in software engineering by software development and quality assurance teams. Automated tools can assist programmers and developers in carrying out static analysis. The software will scan all code in a project to check for vulnerabilities while validating the code.. [By Alexander S. Gillis]
  • Q: What is a CI/CD pipeline?
    • A: A CI/CD pipeline automates your software delivery process. The pipeline builds code, runs tests (CI), and safely deploys a new version of the application (CD). Automated pipelines remove manual errors, provide standardized feedback loops to developers, and enable fast product iterations...[Marko Anastasov]
  • Q: Where I can find the details about CI/CD pipelines in CodeNOW?
  • Q: You get an error message The build has failed.. Where can you find the details about the error?
    • A: Build detail -> build (in CI/CD pipeline)

View Build Details

  • Q: What is Git?
    • A: Git is a software for tracking changes in any set of files, usually used for coordinating work among programmers collaboratively developing source code during software development. Its goals include speed, data integrity, and support for distributed,... [Wikipedia]
  • Q: How to create a new Git branch in GitLab?
  • Q: What does a Tag in Git context mean?
    • A: A tag is used in Git contexts for marking a specific version. Alternatively, tags are used to mark specific points in the history as important or to mark release points. Once a tag is set, it is usually not moved after that.
  • Q: Can the customer change the CI/CD pipeline? (for example: skip the SonarQube analysis in the release build)
    • A: Yes, individually for each component in the component detail. (Do it only if you really know what are you doing.)

Task 5 - Create an Application Package

  1. Create an Application Package version 1.0.0

  2. Include api-component-<YourLastName> and frontend-component-<YourLastName>, both in version 1.0.0.

  3. Add a red Label NonPROD

  4. Add a green Label <YourLastName>FirstAppPackageLabel

FAQ
  • Q: What is an Application Package?
  • Q: What is the purpose of Application Package Labels?
    • A: To enable user to set a custom colored notes for a specific Application Package Version. (e.g. NON-PROD , UI-IMPROVEMENTS, LOGING-BUG-FIX, ...)

Task 6 - Create Deployment Configurations

  1. Create a Deployment Configuration for the application testapp-<YourLastName> and the dev-<YourLastName> Environment

    • Use the testapp-<YourLastName>-1.0.0 Application Package
    • Edit the frontend-component-<YourLastName> configuration file runtime-configuration.js:
    • Set the HELLO_TARGET parameter to <YourLastName>. This application instance is deployed in the DEV environment. For example:
    • HELLO_TARGET: Smith. This application instance is deployed in the DEV environment.
    • NOTE: If you cannot find the runtime-configuration.js, check if you used the correct stack (JavaScript, NPM and React) for the component.
  2. Create a Deployment Configuration for the application testapp-<YourLastName> and the test-<YourLastName> Environment

    • Use the testapp-<YourLastName>-1.0.0 Application Package
    • Edit the frontend-component-<YourLastName> configuration file runtime-configuration.js:
    • Set the HELLO_TARGET parameter to <YourLastName>. This application instance is deployed in the TEST environment. For example:
    • HELLO_TARGET: Smith. This application instance is deployed in the TEST environment.
    • NOTE: If you cannot find the runtime-configuration.js, check if you used the correct stack (JavaScript, NPM and React) for the component.

Task 7 - Deploy an Application

  1. Deploy the testapp-<YourLastName>-1.0.0 in the dev-<YourLastName> and test-<YourLastName> Environment with the Deployment configurations created in step 6. The Deployment configuration will be selected automatically according to the selected Environment when initializing the Deployment.

    • Leave other configuration (Assigned domains, and others) unchanged and deploy the application.
  2. Navigate to the deployed application detail and access the front-end API from the integrated browser (Open in browser).

  3. You should see a web page with your and Environment name in the hyperlink. Make a screen capture.

  4. Repeat the steps for the both Environments (dev and test).

Deployed Application

Task 8 - Send DONE report

  1. Send DONE message (email/slack message)
    • Subject: CN onboarding Part1 DONE - <YourLastName>
    • To: Your Manager
    • Cc: [email protected]
    • Body:
      • Hi, Part 1 is done. <YourLastName>
      • Screenshot and URL of your deployed application to dev environments
      • Screenshot and URL of your deployed application to test environments
      • URL of your application in CodeNOW (e.g. https://playground.codenow.com/applications/testapp-<YourLastName>)