Connecting Repositories to Software Components (prev. Services)
You can map where all of a component's code and configuration reside by associating repositories to it. OpsLevel supports sophisticated relationships such as monorepos.
Visualize Components
Connecting repositories to your components allows you to keep track of how your services and repositories are related.
There are multiple ways to visualize the connections between your components and repositories. This can be done from the Repositories List Page, Repository Details Page and from a Component Page.
Repositories List Page
From the Repositories List Page you can see which components are connected to each of your repositories from the Connected Components column.
Repository Details Page
From a Repository Details Page you can see which components are connected to your repository from the Components card.
This page also shows you which paths are being used by which components. This is especially useful when dealing with monorepos.
Component Page
You can also view which repositories are used by a particular component from a Component page.
Navigate to a component's Summary Tab. From there, you can see the repositories and paths are used by your component in the Repositories card.
Connecting Components
Repositories List Page
To connect a component to your repository from the Repositories List Page, hover over a None field in the Connected Components column and click on the pencil icon.
After clicking the pencil icon, you can select a component from the dropdown menu.
If you have a lot of components, you can use type ahead search to find your component.
If this repository is storing the code for a component that’s not yet tracked in OpsLevel, you can add that component in OpsLevel by clicking + Create Component.
When adding a component to OpsLevel from a repository, the repository to component connection will happen automatically.
Repository Details Page
You can only edit the connected components from a Repository Details Page if the repository does not have any connected components defined. To connect a component to your repository from the Repository page, visit a repository that has no connected components. Press the Select a Component dropdown.
If you have a lot of components, you can type ahead search to find your component.
If this repository is storing the code for a component that’s not yet tracked in OpsLevel, you can add that component in OpsLevel by clicking + Create Component.
When adding a software component to OpsLevel from a repository, the repository to component connection will happen automatically.
Component Page
To connect or edit repository connections from the Component page, navigate to the component you wish to connect your repository. Once there, navigate to the Summary tab.
Click the Edit button on the Repositories card.
Then click the ”+ Add Repository”.
From the Create Repo modal, you can select the repository you wish to connect from the Repository field and click the Create button.
Note: If you have a lot of repositories, you can use type ahead search from this dropdown.
From this modal, you can also choose which Directory in the repository you wish to connect to your component. This is especially useful if you are using monorepos.
You can also choose to sync the repository’s owner with your component by clicking on the Sync Owner checkbox.
opslevel.yml
You can also define which repositories are connected to your components using opslevel.yml
. Refer to the opslevel.yml docs for more information.
Monorepos
A monorepo is a single repository that stores all the code and assets for your project. Some monorepos house many microservices. In this case, it’s important to know how all your microservices are related to your repository. This can be done by connecting components to different paths in your repository.
To specify which path of a repository is connected to your microservice, refer to the Component Page subsection of Connecting Components.
You can see which repository path is connected to your component from the Repositories Card on a component page.
Updated 28 days ago