🕓 10 minutes
What you'll learn
- How to create a new Application Component that will contain the source code for a specific application logic.
What is a CodeNOW Application Component?
- Components in the Microservice architecture encapsulate a separate application logic, for example user details, billing, shipping and others.
- Application Components contain the source code for the given Application in separate Git repositories.
- Components have a separate versioning scheme (Each Component is versioned by its Builds).
An application in the microservices architecture is described by the application components and their orchestration.
- An existing Application, see Create a New Application.
Supported technology stacks
If you want to use external Docker images, change how an Application is deployed with Helm Charts or your desired tech stack just isn't listed below, see Using custom cluster configuration and Docker images in CodeNOW.
|TypeScript||NPM||Storybook for Angular|
Create a new Component
- Go to the Application Detail of the Application you want to create a Component for and click on Choose Action -> Create New Component (or Create Component under Components section).
- Choose a name for the Application Component, optionally add a description.
- Technical name is an identificator that will be used internally by CodeNOW. It is automatically truncated to 30 characters (because of Kubernetes labels). You can change the technical name yourself if you want to.
- If you want to import an existing git repository instead of creating a new one, see Import an existing git repository.
- Choose a supported technology stack (Language|Build Tool|Framework) that you want to use in the Component.
- Java and PHP only: edit the package name in Starter Configuration.
- If you want to connect a Managed Service (eg. a database, messaging service or authentication service) to your Component, click Add New Connection.
- For more information, see Connect Service to Component.
- Click Create Component.
- Set up your Local Environment by doing the following:
- Make sure you have SSH set up.
- Clone your repository by running the given command. Click on Next.
- Follow the instructions in order to set up your local environment correctly. Instructions may vary depending on the stack you chose.
Click on Create New Component
Name your Component
Choose your stack
Edit package name if you've chosen Java or PHP
Optionally connect a Managed Service to your Component
Clone your repository
Set up local environment
Import an existing git repository
CodeNOW currently supports importing repositories from GitHub.
While creating a new Component, do the following:
Click on Existing git repository under Git settings.
If this is your first time importing a repository from GitHub.
- Click on Authorize GitHub.
- Log in to your GitHub account.
- Choose which repositories will be accessed by CodeNOW.
All repositories to which CodeNOW already has access and on which your currently authorised acccount is a Collaborator will be automatically available to import.
Choose the repository you want to import.
- you can edit your CodeNOW preferences in GitHub by clicking ⚙️
Select Authorize GitHub
Select repositories that will be authorised
Select repository that will be imported