Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New functionality: Business Systems #11213

Open
vliats2022 opened this issue Dec 16, 2022 · 11 comments
Open

New functionality: Business Systems #11213

vliats2022 opened this issue Dec 16, 2022 · 11 comments
Labels
complexity: medium Requires a substantial but not unusual amount of effort to implement needs milestone Awaiting prioritization for inclusion with a future NetBox release netbox status: backlog Awaiting selection for work type: feature Introduction of new functionality to the application

Comments

@vliats2022
Copy link

vliats2022 commented Dec 16, 2022

NetBox version

v3.4.0

Feature type

New functionality

Proposed functionality

Business Systems (or Business applications) are a type of application that are used to improve the operations of a business.
For example, SAP ERP, Oracle EBS ERP, MES (Manufacturing Execution System), Material balance system, etc.

In general, a Вusiness system from the point of view of IT infrastructure operates on a certain number of VMs (database servers,
application servers, WEB servers, integration servers, etc.). Every business system has production environment, test environment,
development environment. Each environment is a collection of different VMs (bera metal servers).

Very often we or our bosses would like to know how many resources (VMs or bare metal servers) one business system or enother.
Often we would like to know how much resources (VMs or bare metal servers) one system or another is using.

Use case

A possible attributes for describing a business system:

  1. Application Name

  2. Application Description

  3. Application Type

    • Commercial off-the-shelf (COTS)
    • COTS with Customization
    • Custom
    • ...
  4. Tenant or Business Application Owner (for example, this field can refer to the Tenant entity of NetBox)
    This is the application owner from the business, for example, various departments or organizations, etc.

  5. Contact (this field can refer to the contacts entity of NetBox)
    These are IT employees, for example, application administrator, devops engineer, etc.

  6. Criticality

    • Mission-critical
    • Unit-critical
    • High
    • Medium
    • Low
    • Very Low
    • ...
  7. Is internet accessible

Database changes

A possible database schema could be something like this:

CREATE TABLE criticality (
	id int8 NOT NULL,
	"name" varchar(64) NOT NULL,
	last_updated timestamptz NULL,
        created timestamptz NULL,
	description text NULL,
	CONSTRAINT criticality_pkey PRIMARY KEY (id)
);

CREATE TABLE app_type (
	id int8 NOT NULL,
	"name" varchar(64) NOT NULL,
	last_updated timestamptz NULL,
        created timestamptz NULL,
	description text NULL,
	CONSTRAINT app_type_pkey PRIMARY KEY (id)
);

CREATE TABLE businessapplication (
	id int8 NOT NULL,
	"name" varchar(256) NOT NULL,
	last_updated timestamptz NULL,
        created timestamptz NULL,
	description text NULL,
	tenant_id int8 NULL,
	criticality_id int4 NULL,
	notes text NULL,
        app_type_id int4 NOT NULL,
        is_internet_access BOOLEAN NOT NULL,
	CONSTRAINT businessapplication_pkey PRIMARY KEY (id)
);

ALTER TABLE businessapplication ADD CONSTRAINT fk_businessapplication_app_type FOREIGN KEY (app_type_id) REFERENCES app_type(id);
ALTER TABLE businessapplication ADD CONSTRAINT fk_businessapplication_criticality FOREIGN KEY (criticality_id) REFERENCES criticality(id);
ALTER TABLE businessapplication ADD CONSTRAINT fk_businessapplication_tenancy_tenant FOREIGN KEY (tenant_id) REFERENCES tenancy_tenant(id) DEFERRABLE INITIALLY DEFERRED;

--

CREATE TABLE businessapplication_assignment (
	id int8 NOT NULL,
        last_updated timestamptz NULL,
        created timestamptz NULL,
	businessapplication_id int4 NULL,
	object_id int8 NOT NULL, -- id from the table of devices or virtual machines here
        content_type_id int4 NOT NULL,
	CONSTRAINT businessapplication_assignment_pkey PRIMARY KEY (id),
        CONSTRAINT businessapplication_assignment_object_id_check CHECK ((object_id >= 0)),
);

-- public.businessapplicationelement foreign keys
ALTER TABLE businessapplication_assignment ADD CONSTRAINT fk_businessapplication_assignment_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;
ALTER TABLE businessapplication_assignment ADD CONSTRAINT fk_businessapplication_assignment_businessapplication FOREIGN KEY (businessapplication_id) REFERENCES businessapplication(id);

External dependencies

No new dependencies.

@vliats2022 vliats2022 added the type: feature Introduction of new functionality to the application label Dec 16, 2022
@ziggekatten
Copy link

ziggekatten commented Dec 16, 2022

You can achieve this with services, tags, contacts and custom fields already today.

But you are getting close to the CMDB realm, and should maybe consider integrate netbox with a real CMDB. for example iTop. A real CMDB handles relations to external parties as well, like integrations, that really dont fit to be modelled in netbox.

@stavr666
Copy link

stavr666 commented Dec 17, 2022

CMDB is not infrastructure-level logic. It's a (company) management logic. So, I'd prefer not have any of it in our "source of truth" service.

We have CMDBuild for this kind of stuff. All that matter for business projected there from Netbox. There you can limit some stuff by state, tenant etc., without continuously telling someone (without deep infrastructure knowledge), why they have "limited access".

P.S. Also, business apps operate close with financial responsibility and other relations. Integrating all that external contacts/schematics, that have not any relations to infrastructure outside of business logic...

@apellini
Copy link
Contributor

It's a good idea, also you could create relation with services and so you have the set of ports exposed by a business application.
Furthemore, we could create relation between them to collect network flows that are existing on your datacenter in high level mode.

@jeremystretch jeremystretch added the status: under review Further discussion is needed to determine this issue's scope and/or implementation label Dec 29, 2022
@AlexCh1991
Copy link

Yes, it would be nice to have some information about business applications in the Netbox. Of course, we can use tags, but it's not comfortable for us. Integrating Netbox with CMDB for such a simple task is too complicated.

@DanSheps
Copy link
Member

For all those thumbing up, if you are doing it because you want this, make sure you thumb up the main FR. 😄

@jeremystretch jeremystretch added needs milestone Awaiting prioritization for inclusion with a future NetBox release and removed status: under review Further discussion is needed to determine this issue's scope and/or implementation labels Apr 5, 2023
@alehaa
Copy link
Contributor

alehaa commented Mar 3, 2024

For managing our infrastructure, I came across the same problem. For our needs, most of the tenancy feature is sufficient, i.e. resources are assigned to an application tenant instead of an organizational unit tenant. You may be able to add some custom fields to tenants to cover additional characteristics such as criticality.

@jeremystretch jeremystretch added the status: backlog Awaiting selection for work label May 21, 2024
@arthanson arthanson added the complexity: medium Requires a substantial but not unusual amount of effort to implement label May 22, 2024
@alehaa
Copy link
Contributor

alehaa commented Jul 28, 2024

I'd like to contribute to this as I see great value in this information for managing applications in our infrastructure, e.g. to automatically add resource spaces in monitoring or virtualization systems. If there's interest, I can provide a PR for one of the following milestones.

A key question that came up in the discussion of Alef-Burzmali/netbox-data-flows#25 is, whether or not a resource can belong to a Tenant and an Application at the same time. If not, I think most of the tenancy logic could be reused to implement this feature. Another question would be whether this FR should only implement resource allocation, or also how they relate to each other (i.e. Application A uses API of Application B).

@goteamkor
Copy link

I personally feel this FR #17196 better fits the idea of modeling applications.

@alehaa
Copy link
Contributor

alehaa commented Sep 14, 2024

If I understand correctly, #17196 and the NetBox IPAM services target IP services. However, this FR targets applications in general. An application needs different resources to provide a certain service, which could be a device or a virtual machine, but also completely different resources like IP pools, DNS zones or even paper forms. So I think these FRs should be handled separately.

@jeremystretch could we add this to the 4.2 milestone by any chance? I think the window should be long enough to submit a PR and discuss any changes needed after review.

@goteamkor
Copy link

goteamkor commented Sep 15, 2024

If I understand correctly, #17196 and the NetBox IPAM services target IP services.

no, it targets applications.
Adding some of the fields above to existing 'services' model would accomplish what you're looking for, and leverage a lot of what already exists with the current model.

#17196 aims to address a big gap in modeling layers 4-7 within NetBox.
What's great is that a lot of what is needed already exists within the services model. The problem is its too constrained to model only a single port/protocol rather than allowing grouping of ports/protocols to form an application which you can then associate with devices or virtual machines.

items 1, 2, 4, and 6 are already addressed in the current 'services' model. Adding some custom fields to a group of services aka an application for the 'application type' and the 'criticality' are simple enough.

@jeremystretch jeremystretch added the netbox label Nov 1, 2024 — with Linear
@jeremystretch
Copy link
Member

FYI we're working on a solution for service mapping at NetBox Labs, which seems likely to address the use case cited above.

We want your input. If you have a compelling use case—or simply want to kick the tires—please reach out to [email protected] with a short description of what you’re trying to achieve. We’ll select a few participants for deeper feedback sessions when we move to the Private Preview stage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
complexity: medium Requires a substantial but not unusual amount of effort to implement needs milestone Awaiting prioritization for inclusion with a future NetBox release netbox status: backlog Awaiting selection for work type: feature Introduction of new functionality to the application
Projects
None yet
Development

No branches or pull requests

10 participants