# Table of Contents - [Links | MechCloud](#links-mechcloud) - [Basic | MechCloud](#basic-mechcloud) - [Configure Regions / Zones | MechCloud](#configure-regions-zones-mechcloud) - [Cloud Accounts | MechCloud](#cloud-accounts-mechcloud) - [Multitenancy | MechCloud](#multitenancy-mechcloud) - [Add An Account | MechCloud](#add-an-account-mechcloud) - [AWS | MechCloud](#aws-mechcloud) - [Tenant | MechCloud](#tenant-mechcloud) - [Comparison With WordPress | MechCloud](#comparison-with-wordpress-mechcloud) - [Pro | MechCloud](#pro-mechcloud) - [Subscriptions | MechCloud](#subscriptions-mechcloud) - [What is MechCloud? | MechCloud](#what-is-mechcloud-mechcloud) - [Team | MechCloud](#team-mechcloud) - [Tutorials / Blog Posts | MechCloud](#tutorials-blog-posts-mechcloud) - [GCP | MechCloud](#gcp-mechcloud) - [Azure | MechCloud](#azure-mechcloud) - [AWS | MechCloud](#aws-mechcloud) - [REST API Agent | MechCloud](#rest-api-agent-mechcloud) - [AWS Agent | MechCloud](#aws-agent-mechcloud) - [Real-time Visualization | MechCloud](#real-time-visualization-mechcloud) - [Discover Assets | MechCloud](#discover-assets-mechcloud) - [CloudTrail | MechCloud](#cloudtrail-mechcloud) - [Layout | MechCloud](#layout-mechcloud) - [EC2 | MechCloud](#ec2-mechcloud) - [Site Node | MechCloud](#site-node-mechcloud) - [Micro app based architecture | MechCloud](#micro-app-based-architecture-mechcloud) - [Frame | MechCloud](#frame-mechcloud) - [ | MechCloud](#-mc-navigation-link-mechcloud) - [External Page | MechCloud](#external-page-mechcloud) - [GCP | MechCloud](#gcp-mechcloud) - [Site | MechCloud](#site-mechcloud) - [ | MechCloud](#-mc-render-node-mechcloud) --- # Links | MechCloud [Discord](https://discord.gg/gvbewRDRe4) [Youtube](https://youtube.com/@mechcloud) [Blog](https://blog.mechcloud.io) [LinkedIn](https://www.linkedin.com/company/mechcloud/) [Twitter](https://twitter.com/mech_cloud) [PreviousWhat is MechCloud?](/) [NextComparison With WordPress](/comparison-with-wordpress) Was this helpful? --- # Basic | MechCloud ### [](#id-1.-pricing) **1\. Pricing** **Price** - $0 ### [](#id-2.-features) 2\. Features #### [](#id-2.1-multitenancy) 2.1 Multitenancy * **Tenant** - No support * **Team** - Two teams in the default tenant #### [](#id-2.2-site-builder) 2.2 Site Builder * **External pages** - 5 * **Frames** - 1 * **Components** - 5 * **Number of sites** - 1 * **Pages per site** - 5 (Design as well as External) #### [](#id-2.3-infrastructure) 2.3 Infrastructure * **Cloud Accounts** - Two accounts per cloud provider (AWS, GCP and Azure) * **Vpc** * GCP - Two VPCs per project * AWS / Azure - Two VPCs per region * **Subnet** \- Two subnets per vpc * **Virtual Server** - Two virtual servers per subnet [PreviousSubscriptions](/administration/subscriptions) [NextPro](/administration/subscriptions/pro) Last updated 1 year ago Was this helpful? --- # Configure Regions / Zones | MechCloud [PreviousAzure](/cloud-computing/cloud-accounts/add-an-account/azure) [NextDiscover Assets](/cloud-computing/cloud-accounts/discover-assets) Last updated 8 months ago Was this helpful? 1. Once you have added a cloud account, you will need to configure regions/zones for that account so that cloud assets in those regions/zones can be discovered. 2. Log on to [MechCloud](https://portal-preview.mechcloud.io) and navigate to **Infrastructure** -> **Cloud Account**. 3. Select a team. 4. Select a cloud provider under **Select a cloud provider** dropdown. This will display all the cloud accounts added for the selected cloud provider. 5. Click on three dots against a cloud account and click on **Configure Regions/Zones** option. 6. On the next screen click on on an availability zone to select a particular zone or click on region name to (de)select all the zones under that region. 7. Click on **Save** button. ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2F3435649067-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FQGHt89wn8Cn0pcK36Wir%252Fuploads%252Fu9DFq7DRwlQZo5oskSIz%252Fimage.png%3Falt%3Dmedia%26token%3D9a65c5a3-e0d1-4b31-92cd-bb90a5d85b44&width=300&dpr=4&quality=100&sign=c12b659e&sv=2) --- # Cloud Accounts | MechCloud [Add An Account](/cloud-computing/cloud-accounts/add-an-account) [Configure Regions / Zones](/cloud-computing/cloud-accounts/configure-regions-zones) [Discover Assets](/cloud-computing/cloud-accounts/discover-assets) [Real-time Visualization](/cloud-computing/cloud-accounts/real-time-visualization) [PreviousPro](/administration/subscriptions/pro) [NextAdd An Account](/cloud-computing/cloud-accounts/add-an-account) Was this helpful? --- # Multitenancy | MechCloud MechCloud supports two levels multitenancy with following concepts - * [Tenant](/administration/multitenancy/tenant) * [Team](/administration/multitenancy/team) [PreviousTutorials / Blog Posts](/tutorials-blog-posts) [NextTenant](/administration/multitenancy/tenant) Last updated 6 months ago Was this helpful? --- # Add An Account | MechCloud [PreviousCloud Accounts](/cloud-computing/cloud-accounts) [NextAWS](/cloud-computing/cloud-accounts/add-an-account/aws) Last updated 8 months ago Was this helpful? [AWS](/cloud-computing/cloud-accounts/add-an-account/aws) [GCP](/cloud-computing/cloud-accounts/add-an-account/gcp) [Azure](/cloud-computing/cloud-accounts/add-an-account/azure) --- # AWS | MechCloud 1. Log on to AWS console (https://console.aws.amazon.com). 2. Create an IAM user. 3. Make sure it is having following policies selected under **Permissions -> Permissions policies** \- * AmazonEC2ReadOnlyAccess 4. Create an access key under **Security credentials -> Access keys** and note down values of **Access key** and **Secret access key**. 5. Log on to [MechCloud](https://portal-preview.mechcloud.io) and navigate to **Infrastructure** -> **Cloud Account**. 6. Select a team. 7. Select AWS under **Select a cloud provider** dropdown. This will display all the cloud accounts added for the AWS cloud provider. 8. Click on **New Cloud Account** button. 9. ~Enter a name for your account.~ 10. ~Vpc API Credentials~ * ~**Key Id**~ ~- Enter your access key here generated in step # 4 above.~ * ~**Secret Key**~ ~- Enter your secret access key here generated in step # 4 above.~ 11. Follow steps described [here](https://blog.mechcloud.io/announcing-mechcloud-chatbot-for-aws-apis#heading-configure-an-aws-account) to configure details of your aws account. 12. Click on **Save** button to add the cloud account. [PreviousAdd An Account](/cloud-computing/cloud-accounts/add-an-account) [NextGCP](/cloud-computing/cloud-accounts/add-an-account/gcp) Last updated 8 months ago Was this helpful? --- # Tenant | MechCloud MechCloud supports two types of tenants at this moment - * Simple * Partner Major difference between a Simple and Partner tenants is that a Partner tenant can create its own tenants **which can be Simple tenants only**. ### [](#id-1.-partner-tenant) 1\. Partner tenant #### [](#id-1.1-infrastructure-management) 1.1 Infrastructure Management * A partner tenant can restrict cloud provider regions for its child tenants to make sure that the tenants managed by it can create or discover resources in these regions only. * E.g. if you are a partner from India, who is catering to customers from India only, then you can select India regions across three hyperscalers to make sure that your customers from India are restricted to India regions only. * If you are catering to customers from multiple countries then you can select hyperscaler regions (e.g. US and India) for all such countries at the partner tenant level. Tenant admin of your child tenant will then be able to restrict its tenant to some or all the regions configured at the parent tenant level. [PreviousMultitenancy](/administration/multitenancy) [NextTeam](/administration/multitenancy/team) Last updated 1 year ago Was this helpful? --- # Comparison With WordPress | MechCloud ### [](#id-1.-hosting) 1\. Hosting Unlike WordPress, **MechCloud** has no hosted version, removing the confusion between SaaS and hosted options. This also eliminates the need for extensive research to determine the best version for your needs, a common first step for new WordPress users. Many users spend a significant amount of time and effort understanding the differences between the various offerings, including maintenance, support options, and pricing structures. With **MechCloud**, this entire process is streamlined, allowing new users to get started faster and focus on building their projects without worrying about selecting the right platform variant. This simplicity can be especially beneficial for small businesses or individuals with limited technical resources. ### [](#id-2.-built-in-page-designer) 2\. Built-in page designer * Unlike infinite number of page designers (e.g. Gutenberg, Elementor, Divi, Oxygen etc) available for WordPress, MechCloud includes a built-in, AI-powered page designer, eliminating the endless search for the best page designer. ### [](#id-3.-hard-separation-between-custom-code-and-mechcloud-code) 3\. Hard separation between custom code and MechCloud code * Unlike Wordpress (when plugins, themes code sits adjacent to the wordpress core code and having full access to its db), custom code in MechCloud is injected from a remote location at runtime and so don't have any access to its file system. ### [](#id-4.-modular-architecture) 4\. Modular Architecture * Custom assets (frames, layouts, CSS frameworks, UI components library, etc.) are centrally hosted in a manner akin to a static website and **require no installation procedures**. This arrangement allows you to amalgamate modular components from various providers to rapidly construct the desired website, efficiently sidestepping the time-consuming task of customizing a WordPress theme, which often fails to meet specific needs. * When you embark on creating a site (such as a personal blog or a brand website), you usually start by hunting for a WordPress theme that aligns with your website's goals. This search can be extensive and laborious, often leading to a disappointing outcome where no theme precisely fits your needs, or you find a theme that is somewhat suitable but necessitates significant customization to function as required. * In contrast to a WordPress theme's comprehensive approach, where the theme aims to cover all aspects of a site, MechCloud leverages a modular architecture. This allows you to assemble site pages from modular and reusable components, such as frames and layouts. The modular approach offered by MechCloud presents numerous advantages over WordPress' all-encompassing theme strategy: * **Flexibility:** Since components are modular, you can pick and choose only the necessary ones, tailoring each part of your site to specific requirements without altering an entire theme. * **Efficiency:** Rapidly mix and match existing components to create the needed features, saving both time and effort. * **Customization:** Modifying individual components is generally simpler and more straightforward than reshaping an entire theme, allowing for easier updates and maintenance. * **Reusability:** The same components can be reused across different projects or sections of the site, fostering consistency and reducing redundancy. Overall, MechCloud's modular, component-based architecture significantly departs from the traditional, monolithic approach of WordPress themes, offering a more adaptable, efficient, and manageable solution. ### [](#id-5.-no-plugin-hell) 5\. No Plugin Hell All the basic features (analytics, advanced identity and access management, page builder etc), which otherwise require third party plugins in case of WordPress, are built into MechCloud website builder. So no endless research to find the best plugin for a basic feature (e.g. analytics) and no fear of being spammed by the creators of these plugins. ### [](#id-6.-host-enterprise-private-assets-in-your-private-network) 6\. Host (enterprise) private assets in your private network As an enterprise customer you can host your custom assets (frames, layouts, external pages, components) in your private network which will be consumed by MechCloud page designer when it is accessed within your private network. This arrangement makes it possible to make the private custom assets of an enterprise available to only those users (e.g. employees, partners) who are authorized to access the private network of an enterprise. ### [](#id-7.-modern-features-for-partners) 7\. Modern features for Partners * MechCloud has first class support for Partners and Customers ( two types of tenants ) which makes it possible for partners to offer their own marketplace for custom assets. This not only makes it possible to distribute custom assets from a central location (instead of uploading these on gumroad like sites) but also helps keep these custom assets up to date without any intervention from the customer. * Built in support for subscription for partners to monetize custom assets. So a partner would be able to put its custom assets behind a subscription and the target site will not be able to use these custom assets if subscription is not renewed after the expiry date. * Partners can create/manage their own tenants. [PreviousLinks](/links) [NextTutorials / Blog Posts](/tutorials-blog-posts) Last updated 5 months ago Was this helpful? --- # Pro | MechCloud ### [](#id-1.-pricing) **1\. Pricing** **Price** - $10 / month ### [](#id-2.-features) 2\. Features #### [](#id-2.1-multitenancy) 2.1 Multitenancy * **Tenant** - 5 children tenants * **Team** - 10 teams per child tenant [PreviousBasic](/administration/subscriptions/basic) [NextCloud Accounts](/cloud-computing/cloud-accounts) Last updated 1 year ago Was this helpful? --- # Subscriptions | MechCloud MechCloud has support for the following subscriptions at this moment - * [Basic](/administration/subscriptions/basic) * [Pro](/administration/subscriptions/pro) * Team (Coming soon) * Startup (Coming soon) * Enterprise (Coming soon) * Partner (Coming soon) [PreviousTeam](/administration/multitenancy/team) [NextBasic](/administration/subscriptions/basic) Last updated 1 year ago Was this helpful? --- # What is MechCloud? | MechCloud [NextLinks](/links) Last updated 1 month ago Was this helpful? [MechCloud](https://mechcloud.io) ® is a unified tool which can be used to build websites, manage containerized apps, kubernetes and cloud infrastructure using AI-powered agents. It can also manage resources of Cloudflare and any other system (e.g. MongoDb) exposing it control plane over a REST API **without storing api key or any other sensitive credentials into its database.** It has been developed from scratch to meet the needs of modern websites created for different purposes **(e.g. Edtech, Marketing, Intranet, Portals, Internal developer portal, content management system etc)**. Unlike other website builders, MechCloud has support for custom assets (frames, layouts, components) and pages which can either be coded for complex requirements or designed using an AI enabled page designer **making it the only website builder which offers this kind of flexibility**. ### [](#extending-mechcloud-using-custom-components) Extending MechCloud using custom components MechCloud can be extended using micro app architecture where a micro app containing custom component developed by customers is injected into MechCloud at runtime. **This way MechCloud remains as lean as possible unlike many other startup / enterprise grade software which either does not support this architecture or have many features which customers are forced to pay but don't use.** * Custom components (frames, layouts, external pages, components) can be hosted by the customers on any offering (e.g. cloudflare pages, github pages, S3 etc) which supports hosting static assets. These are consumed at runtime by MechCloud which eliminates the risk of tempering of MechCloud code by the custom code. This is one of the biggest problems with **WordPress** plugins. * **Custom components can be hosted in the private network too by the customers who don't want to expose these assets over public internet.** * A website developer can develop custom assets in the local development environment and changes to all such assets will reflect in MechCloud in the real time. Partner driven micro app architecture (1) ### [](#multitenancy) Multitenancy * It has superior multitenancy where you can **pin a tenant** (represents a direct customer or partner) to a zone ( a logical region to host the data for users from one or more countries ) having its dedicated infrastructure. This helps in meeting strict data residency requirements for the customers who want to have their data in a particular region (e.g. Europe) /country only. * **Dedicated infrastructure** for each zone to make sure that its infrastructure can be scaled independent of other zones. * **Custom domains** are supported both at tenant and (web)site levels. First one is useful for the companies having their dedicated tenant in MechCloud while the latter is meant for B2C customers to map their (web)sites, created through MechCloud website builder, to custom domains. ### [](#superior-partner-support) **Superior Partner Support** * Partners are onboarded using a dedicated tenant type which is meant for enabling functionalities which are required by the partners. * Partners can create/manage their own tenants which will have one to one mapping to their customers. ### [](#cloud-computing) Cloud Computing * It has build-in components for visualizing and provisioning hyperscaler infrastructure across three providers - AWS, Azure and GCP. * [https://www.youtube.com/watch?v=mpP3Z\_C0ie0](https://www.youtube.com/watch?v=mpP3Z_C0ie0) * It provides a chatbot for managing AWS EC2 and Lightsail infrastructure using plain english commands. * [https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-ec2-resources](https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-ec2-resources) * [https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-lightsail-resources](https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-lightsail-resources) You can replace different types of softwares with **MechCloud** - * **Replacement for SaaS boilerplates -** Instead of starting you SaaS journey with a boilerplate, you can use MechCloud as a base for your SaaS application to enable multitenancy, SSO, data residency and other must have SaaS features for your SaaS application immediately without coding/integrating these functionalities from scratch. This also eliminates the need for handling the underlying infrastructure for your SaaS application. * **Content Management Systems -** You can replace a content management system (e.g. **WordPress**) with it as it offers much superior features at less than 1/10th of the price compared to other content management systems. * **Web design tools** - It can be used for faster prototyping, with prototypes being very close to the real website, unlike tools like **Figma** where you first design websites on canvas and then convert them to code either manually or using plugins. **Demo** - [https://www.youtube.com/watch?v=plH2TCsbHC0](https://www.youtube.com/watch?v=plH2TCsbHC0) * **Next.js / Astro etc based websites -** Unlike SSR rendering framework (e.g. Next.js), **MechCloud** does not confuse developers between client side rendering and server side rendering. It is a all-in-one SaaS application based on a client side framework and can be used to generate static websites right from the browser. So with **MechCloud**, developers need to learn only one client side framework and need not to waste time in solving a number of issues which are introduced by SSR frameworks (e.g. next.js) based on client side frameworks. **Demo** - [https://www.youtube.com/watch?v=SuxYxVYb74w](https://www.youtube.com/watch?v=SuxYxVYb74w) * **Portals** - **MechCloud** is a portal technology at its heart, which in simple words means a web application which can be used to create websites and design their pages right from the browser. You can replace following tools with it - * IBM WebSphere Portal * Oracle WebLogic Portal * Microsoft SharePoint * Liferay * Alfresco WebSite BuilderCloud Infrastructure ManagementAI AgentsContainerized Apps Managment Most of the companies (startups / enterprises) already have a number of reusable artifacts (e.g. design system, css library, UI component libraries etc) which these companies would like to leverage for developing their websites/apps. Disadvantage of the existing no/low code tool is that you can't load your reusable artifacts into these tools to develop the website in a way which developers prefer and are comfortable with. So, companies end up in a situation where developers and other people from a company are using two different approaches for developing the websites/apps. MechCloud website builder is a low code tool which lets you load your existing reusable artifacts into it and develop websites with these reusable assets. This approach has following advantages - * It offers flexibility to switch between browser-based development and coding as and when required. E.g. you can create simple pages of a website/app from the browser and switch to coding for developing complex pages/features when it can't be achieved using browser-based approach. * This also eliminates those situations where you are looking for a critical feature in a low/no code tool which is either not on the roadmap or it is on the roadmap but will be available after a long time. * This allows developers and non-developers to collaborate around a tool to develop websites/apps which is not possible in case of other low/no code tools. * Reusable assets help developing websites faster which are aligned with your development best practices and branding of your company. * You don't end up building equivalent of these reusable assets across several low/no code platforms. Most of the low/no code platforms don't even support creating reusable assets. * You can upgrade your reusable code across all the websites from a central location using micro app architecture. This keeps your technical debt to a minimum as your code is aligned with the latest and greatest of html / css / javascript most of the time and you need not to invest a good amount of money into major refactoring or rewriting your websites/apps. This will save precious capital for your company which otherwise can be used for other critical things required to grow your business. A module for - * Designing and provisioning public cloud infrastructure across three hyperscalers (AWS, GCP and Azure) **using visualization first approach**. This module focuses on visualization of public, private and hybrid cloud infrastructure - * It helps you to learn/manage common cloud concepts/constructs (e.g. IAM, VPC etc) across three public cloud providers ( AWS, GCP and Azure) using a single tool. * Discovery of commons constructs (e.g. VPC, Subnet, VM, Kubernetes Cluster) across GCP, AWS and Azure and showing relationship among these using a single click. More resource types will be supported in future. * Delivering a universal IAM experience as IAM is one of the biggest roadblocks to multi-cloud journey or switching from one cloud provider to another. * Creating an abstraction on top of GCP, AWS and Azure so that one can provision common constructs (e.g. VPC, Subnet, VM etc) using a universal api (which has same payload for a particular resource type across these cloud providers) instead of learning provider specific (e.g UI, REST API, cli, cloudformation etc) or generic (terraform, crossplane, pulumi etc) tools. It is like doing one universal certification for these three public cloud providers instead of one per cloud provider. * Helping devops to design and provision private / public / hybrid cloud infrastructure with **supersonic** speed using visualization first approach. An app focused on visualization of public, private and hybrid cloud infrastructure. * It helps you to learn/manage common cloud concepts/constructs (e.g. IAM, VPC etc) across three public cloud providers ( AWS, GCP and Azure) using a single tool. * Discovery of commons constructs (e.g. VPC, Subnet, VM, Kubernetes Cluster) across GCP, AWS and Azure and showing relationship among these using a single click. More resource types will be supported in future. * Delivering a universal IAM experience as IAM is one of the biggest roadblocks to multi-cloud journey or switching from one cloud provider to another. * Creating an abstraction on top of GCP, AWS and Azure so that one can provision common constructs (e.g. VPC, Subnet, VM etc) using a universal api (which has same payload for a particular resource type across these cloud providers) instead of learning provider specific (e.g UI, REST API, cli, cloudformation etc) or generic (terraform, crossplane, pulumi etc) tools. It is like doing one universal certification for these three public cloud providers instead of one per cloud provider. * Helping devops to design and provision private / public / hybrid cloud infrastructure with **supersonic** speed using visualization first approach. **AWS Agent** AWS agent can be used to query or manage resources into one or more AWS accounts. **It does NOT require storing AWS api keys into MechCloud.** **REST API Agent** REST API agent can be used to query and manage resources of any infrastructure system (e.g. Azure, GCP, Cloudflare, MongoDB etc) which exposes its control plane over a REST API. **It does NOT required storing api key or any other sensitive credentials into MechCloud.** A module for - * Designing and provisioning containerized/cloud native applications **using visualization first approach and with universal abstraction for application.** A module focused on kubernetes, docker and containers - * Creating an abstraction on top of kubernetes to help developers develop containerized apps with minimal or zero knowledge of docker and kubernetes. This will make sure that developers are kept out of any migration for years while the devops tools / PaaS / IaaS are continuously evolving. * Helping developers, software/cloud architects to design, develop and deploy cloud / kubernetes native applications with **supersonic** speed using visualization first approach. ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2Fdocs.google.com%2Fdrawings%2Fd%2Fe%2F2PACX-1vT8jPe1Cm9MEe6OQ1VoG-YFgS7iAF9Xunlo1ABkluh13oKun-X75kLGjs54aVnmYijcW0FRMo7VUr4s%2Fpub%3Fw%3D959%26h%3D672&width=768&dpr=4&quality=100&sign=2bc2e30c&sv=2) --- # Team | MechCloud ### [](#default-team) Default Team By default MechCloud defines only one team - **Default (Managed)**. This is an unshared but managed team. * All **authenticated** users are by default members of this team but have only **contributor** and **cloudadmin** roles on this team. * As **authenticated** users are not assigned **creator** role on this team, **an authenticated user can't register custom components (Frame, Layout, External Page, Component) on this team**. ### [](#parameters) Parameters Parameter Description Editable for an existing team Tutorials / Demos / Sample Code **Single Person** * Enable this to create a shared and unmanaged team without configuring advanced team parameters. Useful for solopreneurs or anyone who starts with one person team but may grow to 2-3 members in the future. **This is to keep MechCloud UIs simple by default for small teams.** * Disable this to see advanced team parameters. No **Shared** * In a shared team, a team member can see and access the assets created by other team members which is not possible in case of an unshared team. * In a shared team, two members can't register or create two or more resources of same type (e.g. Frame). No **Managed** * A managed team inherits custom components (e.g. frames, layouts) registered under its parent team. * It is not allowed to register or override custom components under a managed team. No **Owner Team** * **This parameter will be visible for managed teams only.** * An owner team is the one which this team will inherit custom components from. * **Only a shared team can be an owner team. However, this shared team must be created by the same user who is creating a new team.** No **Custom Components Host** * **This parameter will be editable for unmanaged teams only while creating a new team.** * This parameter is read only for a managed team and inherited from its parent team. * This is used to specify the url of a micro app which will be used to load custom components created by third parties. * This parameter can be overridden at the site level for **unmanaged teams only**. **OIDC Proxy** * **This parameter will be editable for unmanaged teams only while creating a new team.** * This parameter is read only for a managed team and inherited from its parent team. * This is used to specify the url of an OIDC (OpenId Connect) proxy **which allows MechCloud to communicate with any third party REAST API (e.g. Cloudflare, MongoDB Atlas etc) without storing api key for any such APIs.** **Members** * Specify email ids of all the users who should be member of this team. Add 'authenticated' group as member if you want all authenticated users to be the members of this team. * A user/group must be added to the members before it can be assigned any role on the team. **Creators / Contributors / Cloud Admins** There are two important aspects of a team which can be configured while creating a team - ### [](#shared-vs-unshared) Shared vs Unshared * A shared team is the one where any asset (e.g. Site, Frame, Layout etc) created by any team member is visible to all the other members of the team. In a shared team, one can't create two resources of same type (e.g. Frame) using same metadata (name, title, code etc). This restriction is not there for an unshared team but a member of an unshared team can't see custom components registered by other team members. **Examples** * As a small startup, you can create two teams - **Employees** and **B2CCustomers**. Here you may choose **Shared** for **Employees** team while unshared must be chosen for the **B2CCustomers** team. **Employees** team will have developers and testers where testers need to see the Frames, Layouts etc registered by developers so that testers can use these to create test websites and validate these components before these components can be made available to the B2C or B2B customers. **B2CCustomers** team should be unshared as you don't want one user to see the data of another user when the members of this team are not related to each other in any way. ### [](#managed-vs-unmanaged) Managed vs Unmanaged * A team can either be managed or unmanaged. A managed team has some restrictions (e.g. can't register its own frames/layouts/external pages/components) imposed on it and inherits certain things (frames/layouts/external pages/components) from its parent (unmanaged) team. * If you configure a team as managed then you will need to select an unmanaged team as a parent for this team. It means you must have at least one unmanaged team created before you can create one or more managed teams. **Examples** * You can create two teams - **Employees** and **Customers** where **Developers** team is configured as unmanaged while **Customers** team is configured as managed (by **Developers** Team). Now whatever assets (e.g. Frames, Components, External Pages etc) will be registered in the **Developers** team will be visible in the **Customers** team but members of the **Customer** team will not be able to register their own custom components (frame, layout etc) or edit the details of custom components inherited from the parent team. ### [](#single-person-team) Single Person Team A single person team is a shortcut to create a shared but unmanaged team. This is suitable for startups / agencies which starts with and remains one man show for a short/long time but may grow to 2 or 3 persons in future. This is something which will be very common in an AI powered era. ### [](#roles) Roles MechCloud defines some roles which are specific to the Team resources. Each role is associated with a certain module (Site builder, Infrastructure management). These roles are as follows - Module Role Comment Site Builder Creator This role allows a user to register frames, layouts, external pages and components under a team. **Note - This role must be explicitly assigned to the user who has created a team and so have admin role by default.** **Single person teams are an exception of this rule where team admin is automatically added to all the roles associated with the Team resource type.** Contributor This role allows a user to create sites and site nodes under such sites in a team. **Note - This role must be explicitly assigned to the user who has created a team and so have admin role by default.** **Single person teams are an exception of this rule where team admin is automatically added to all the roles associated with the Team resource type.** Infrastructure Cloud Admin This role allows a user full access to Infrastructure module where a user with this role can add cloud / REST accounts etc. **Note - This role must be explicitly assigned to the user who has created a team and so have admin role by default.** **Single person teams are an exception of this rule where team admin is automatically added to all the roles associated with the Team resource type.** [PreviousTenant](/administration/multitenancy/tenant) [NextSubscriptions](/administration/subscriptions) Last updated 1 month ago Was this helpful? Reference micro app - Reference - See section. [https://github.com/mechcloud/mechcloud-demo-microapp1](https://github.com/mechcloud/mechcloud-demo-microapp1) [https://github.com/mechcloud/mechcloud-oidc-proxy](https://github.com/mechcloud/mechcloud-oidc-proxy) [Roles](/administration/multitenancy/team#roles) --- # Tutorials / Blog Posts | MechCloud [PreviousComparison With WordPress](/comparison-with-wordpress) [NextMultitenancy](/administration/multitenancy) Last updated 5 months ago Was this helpful? ### [](#id-1.-cloud-computing) 1\. Cloud Computing #### [](#id-1.1-aws) 1.1 AWS #### [](#id-1.2-aws-chatbot) 1.2 AWS Chatbot ### [](#id-2.-website-builder) 2\. Website Builder #### [](#id-2.1-how-to-create-a-simple-website-with-two-levels-of-page-hierarchy-using-piston) 2.1 How to create a simple website with two levels of page hierarchy using Piston #### [](#id-2.2-how-to-create-a-vue-based-micro-app-for-mechcloud) 2.2 How to create a vue based micro app for MechCloud #### [](#id-2.3-how-to-create-a-vue-based-custom-frame-for-mechcloud) 2.3 How to create a vue based custom Frame for MechCloud #### [](#id-2.4-how-to-create-a-vue-based-generic-component-for-mechcloud-page-designer) 2.4 How to create a vue based generic component for MechCloud Page Designer [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FiRYShFmBs4A603u081gZ%2F04fc2553-1694-4baa-8fbe-42fcddc70db6.avif?alt=media&token=70af71ef-38ac-492b-bbb8-a5f0df6914e1)\ \ **Visualizing AWS resources in real-time**](https://blog.mechcloud.io/visualizing-your-aws-resources-in-real-time) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FkhGwDxQ4s4oJ55SBOfRo%2F6dc3b5cc-4cba-45a6-9a97-5d6f1037fd92.avif?alt=media&token=591e01e0-9fd3-4819-940b-d5a3ce59a2da)\ \ **Announcing MechCloud Chatbot for AWS APIs**](https://blog.mechcloud.io/announcing-mechcloud-chatbot-for-aws-apis) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FkhGwDxQ4s4oJ55SBOfRo%2F6dc3b5cc-4cba-45a6-9a97-5d6f1037fd92.avif?alt=media&token=591e01e0-9fd3-4819-940b-d5a3ce59a2da)\ \ **How to use MechCloud AWS Chatbot to manage your AWS EC2 resources**](https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-ec2-resources) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FkhGwDxQ4s4oJ55SBOfRo%2F6dc3b5cc-4cba-45a6-9a97-5d6f1037fd92.avif?alt=media&token=591e01e0-9fd3-4819-940b-d5a3ce59a2da)\ \ **How to use MechCloud AWS Chatbot to manage your AWS Lightsail resources**](https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-lightsail-resources) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FicIlZXv3iGW27fvtJ1Ii%2F143e7bc9-a821-48db-8038-f536d86501b2.avif?alt=media&token=810b09b0-896c-4abc-9bb7-311ade72dd0c)\ \ **Why Replace Your React, Next.js and Astro Sites with MechCloud**](https://blog.mechcloud.io/how-to-replace-react-nextjs-and-astro-based-websites-with-mechcloud) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FkqqDmSblkv1i1NAyQQzt%2F634b08e0-ba69-462c-b929-c693b2fa1540.avif?alt=media&token=543dca05-4eb7-41b7-94fb-abf1186da7b8)\ \ **Announcing No Cost AI Powered MechCloud Page Designer**](https://blog.mechcloud.io/announcing-ai-powered-mechcloud-page-designer) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FeekuFq5me7LusUtP66tx%2F4d62a766-10ef-4a96-a7a9-378df9dc8d7f.avif?alt=media&token=973a07c5-ffd4-49e2-8f6e-890fd91d5f1c)\ \ **How to use micro app or micro frontend architecture to build a partner first ecosystem**](https://blog.mechcloud.io/how-to-use-micro-app-architecture-to-build-a-partner-first-ecosystem) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FKhOvQ7x8nvWNQQi2XooO%2F4d62a766-10ef-4a96-a7a9-378df9dc8d7f.avif?alt=media&token=e6450385-1340-4ab7-a85f-0a5484ad364d)\ \ **Building innovative applications using micro app or micro frontend architecture**](https://blog.mechcloud.io/building-interesting-tools-and-applications-using-micro-app-architecture) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2F7MH49YDsHHHiWJevqmHs%2F8db8bf55-80c0-480e-a361-51a8a6071288.avif?alt=media&token=b0a8ec7d-8446-478a-894f-0670fd484f36)\ \ **Announcing Preview/Beta version of MechCloud® Website Builder**](https://blog.mechcloud.io/announcing-previewbeta-version-of-mechcloud-website-builder) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2F2GCMel5UNzJi6PVcFbjp%2Fd9508491-0f47-41c5-879b-cdd68d648b42.avif?alt=media&token=ea6fb704-f3ca-4785-b9d0-2d98b397404a)\ \ **Part 1**](https://blog.mechcloud.io/part-1-how-to-create-a-simple-website-with-two-levels-of-page-hierarchy-using-piston) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2F2GCMel5UNzJi6PVcFbjp%2Fd9508491-0f47-41c5-879b-cdd68d648b42.avif?alt=media&token=ea6fb704-f3ca-4785-b9d0-2d98b397404a)\ \ **Part 2**](https://blog.mechcloud.io/part-2-how-to-create-a-simple-website-with-two-levels-of-page-hierarchy-using-piston) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FkUnr1uzv8wygtMOvnRG0%2Fff954c9f-c389-4ef4-a1b5-e1d28a7c0ce9.avif?alt=media&token=03aa8220-c654-4d2f-990c-b861e30b29a2)\ \ **Part 1**](https://blog.mechcloud.io/part-1-how-to-create-a-micro-app-for-mechcloud) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FyWQE7G8uFoi83x2LNBKR%2F7645e095-476b-4ec8-88cb-5dcdb7fe3d73.avif?alt=media&token=603812b2-a364-440b-9b75-05a2b42e050c)\ \ **Part 1**](https://blog.mechcloud.io/part-1-how-to-create-a-custom-frame-in-mechcloud) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FyWQE7G8uFoi83x2LNBKR%2F7645e095-476b-4ec8-88cb-5dcdb7fe3d73.avif?alt=media&token=603812b2-a364-440b-9b75-05a2b42e050c)\ \ **Part 2**](https://blog.mechcloud.io/part-2-how-to-create-a-vue-based-custom-frame-for-mechcloud) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FyoaFYWOUNP8lxPOH7c7k%2F130c7826-1569-42f5-b59e-a022e928532f.avif?alt=media&token=e317cb80-25bc-46db-9224-37a17d7104eb)\ \ **Part 1**](https://blog.mechcloud.io/part-1-how-to-create-a-generic-component-for-mechcloud-page-builder) [![Cover](https://3435649067-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FQGHt89wn8Cn0pcK36Wir%2Fuploads%2FyoaFYWOUNP8lxPOH7c7k%2F130c7826-1569-42f5-b59e-a022e928532f.avif?alt=media&token=e317cb80-25bc-46db-9224-37a17d7104eb)\ \ **Part 2**](https://blog.mechcloud.io/part-2-how-to-create-a-generic-component-for-mechcloud-page-designer) --- # GCP | MechCloud 1. Log on to GCP console (https://console.cloud.google.com). 2. Create a service account under a GCP project. 3. Make sure it is having **Compute Engine Viewer** role. 4. Create a new key under **Keys** tab and make sure key type is **JSON**. 5. Save the json file created in previous step to a location of your choice. 6. Log on to [MechCloud](https://portal-preview.mechcloud.io) and navigate to **Infrastructure** -> **Cloud Account**. 7. Select a team. 8. Select AWS under **Select a cloud provider** dropdown. This will display all the cloud accounts added for the AWS cloud provider. 9. Click on **New Cloud Account** button. 10. Enter a name for your account. 11. Vpc API Credentials * **Project Id** - Enter the value of **project\_id** attribute from the json file downloaded in step # 5 above. * **Client Email** - Enter the value of **client\_email** attribute from the json file downloaded in step # 5 above. * **Private Key Id** - Enter the value of **private\_key\_id** attribute from the json file downloaded in step # 5 above. * **Private Key** - Enter the value of **private\_key** attribute from the json file downloaded in step # 5 above. 12. Click on **Save** button to add the cloud account. [PreviousAWS](/cloud-computing/cloud-accounts/add-an-account/aws) [NextAzure](/cloud-computing/cloud-accounts/add-an-account/azure) Last updated 1 year ago Was this helpful? --- # Azure | MechCloud **Note** - Each of your azure subscriptions must be onboarded as a separate account in MechCloud. ### [](#step-1-sign-in-to-azure-portal) **Step 1: Sign in to Azure Portal** 1. Open your web browser and navigate to the [Azure Portal](https://portal.azure.com/) . 2. Sign in using your Azure account credentials. ### [](#step-2-register-a-new-application) **Step 2: Register a New Application** **Follow below instructions to create one application (service account) per every subscription whose assets you want to discover in MechCloud.** 1. In the Azure Portal, search for and select **Microsoft Entra ID**. 2. Under **Manage**, click on **App registrations**. 3. Click on **New registration** at the top. 4. Enter a name for your application/service account. 5. Choose **Accounts in this organizational directory only** under Supported account types. 6. Optionally, enter a Redirect URI if your application requires one. For most service accounts, this can be left blank. 7. Click **Register**. ### [](#step-3-create-a-client-secret) **Step 3: Create a Client Secret** 1. Once your application is registered, navigate to your application's overview page. 2. Select **Certificates & secrets** from the left-hand menu. 3. Under **Client secrets**, click **New client secret**. 4. Enter a description for your secret and choose an expiration period. 5. Click **Add**. 6. After the secret is created, copy the **Value**. This is your client secret and will not be shown again. ### [](#step-4-assign-roles-and-permissions) **Step 4: Assign Roles and Permissions** 1. Navigate to **Subscriptions** in the Azure Portal. 2. Select the subscription you want the service account to access. 3. Search for and click **Access control (IAM)** in left menu. 4. Click **Add ->** **Add role assignment**. 5. Choose Reader (or some other role(s) to list Vnet, Subnets and VMs in this subscription) role from the list. 6. Search for and select the application you registered earlier. 7. Click **Save** to assign the role. ### [](#step-5-obtain-application-client-id-and-tenant-id) **Step 5: Obtain Application (Client) ID and Tenant ID** 1. Go back to the **App registrations** page and select your application. 2. Copy the **Application (client) ID** and **Directory (tenant) ID** from the overview page. ### [](#step-6-register-your-azure-service-account-in-mechcloud) Step 6: Register your Azure service account in MechCloud * Log on to [MechCloud](https://portal-preview.mechcloud.io) and navigate to **Infrastructure** -> **Cloud Account**. * Select a team. * Select Azure under **Select a cloud provider** dropdown. This will display all the cloud accounts added for the Azure cloud provider. * Click on **New Cloud Account** button. * Enter a name for your account. * Vpc API Credentials * **Azure Tenant Id** - Enter tenant id which you obtained in the Step 5 above. * **Client Id** - Enter client id which you obtained in the Step 5 above. * **Client Secret** - Enter client secret which you obtained in the Step 3 above. * **Subscription Id** - Enter the id of the subscription (you can get it from the list of subscriptions in Azure portal) which you had associated the service account (created in the Step 2 above) with. * Click on **Save** button to add the cloud account. [PreviousGCP](/cloud-computing/cloud-accounts/add-an-account/gcp) [NextConfigure Regions / Zones](/cloud-computing/cloud-accounts/configure-regions-zones) Last updated 1 year ago Was this helpful? --- # AWS | MechCloud **Real-time visualization is only supported for vpc, subnet and virtual server resource types as of today.** ### [](#details) Details There are two options available to visualize AWS resources in real-time - * First option is based on **Tags**. **This option is already supported as of today.** * Second option is based on **CloudTrail**. **This option is also supported as of today.** ### [](#choosing-between-tags-and-cloudtrail) **Choosing between Tags and CloudTrail** #### [](#cloudtrail) **CloudTrail** * This is recommended for new / greenfield resources provided you are comfortable with following cons - * It takes some time before an event appears in event history and so this process is slower compared to tags-based approach for real-time visualization. * A trail does not provide any advanced filters to excludes all the events other than the one you are interested in. So, it will be capturing a large number of events in the S3 bucket associated with the trail where many of such events will not be processed by the eventbridge rule required for real-time visualization. * To consume cloudtrail events using eventbridge, you are required to create at least one trail. However, if you are having more than one trails **then you can't select only one of such trails while creating an eventbridge rule** which will forward cloudtrail events to an SQS queue. This could be confusing. #### [](#tags) **Tags** * This option is recommended for existing / brownfield resources and in fact, it is the only option which will work for existing / brownfield resources. However, it can be used for newly created resources as well. * This option requires that you add a tag called **Mc-Asset-Name** to all the resources either at the time of creation or post creation so that it can be discovered in MechCloud in real-time. ### [](#configure-sync-mechanism-for-a-cloud-account) Configure sync mechanism for a cloud account * Navigate to **MechCloud console -> Infrastructure -> Cloud Accounts** page. * Add an account or update an existing account and choose desired sync mechanism as shown below - ### [](#steps) Steps Both the mechanism requires to define a lambda function and a FIFO queue. Steps for setting up these are described below. Sync mechanism specific steps are described under respective page. #### [](#id-1.-create-a-lambda-function) 1\. Create a Lambda function Create a python lambda function with the following details - * **Name** - push-mgmt-events-to-mechcloud * **Runtime** - Python 3.12 * **Code** Copy import json import requests import os def lambda_handler(event, context): print(event) for record in event['Records']: message_body = json.loads(record['body']) team_id = os.environ.get('TEAM_ID') if not team_id: raise ValueError("TEAM_ID environment variable is missing") cloud_account_id = os.environ.get('CLOUD_ACCOUNT_ID') if not cloud_account_id: raise ValueError("ACCOUNT_ID environment variable is missing") access_token = os.environ.get('ACCESS_TOKEN') if not access_token: raise ValueError("ACCESS_TOKEN environment variable is missing") endpoint_url = f"https://portal-api.mechcloud.io/mechcloud-turbine-discovery/v1.0/sync/events?cloudAccountId={cloud_account_id}" headers = { 'Authorization': f"Bearer {access_token}", 'Mc-Team-Id': f"{team_id}", 'Referer': 'https://portal.mechcloud.io/', 'Content-Type': 'application/json' } try: response = requests.post( endpoint_url, headers=headers, timeout=(5, 30), data=json.dumps(message_body) ) response.raise_for_status() print(f"Message pushed successfully: {response.text}") except requests.exceptions.RequestException as e: print(f"Error pushing message: {e}") * Make sure you have following environment variables defined under **Configuration -> Environment variables** - * **TEAM\_ID** - This is the id generated by MechCloud for a team which a cloud account belongs to. Its value is **d65e32d2-e18f-49a7-8cbf-e19205772ea0** for the default team. * **CLOUD\_ACCOUNT\_ID** - This is the unique id which is generated by MechCloud when a cloud account is registered. You can get this from **MechCloud console -> Infrastructure -> Cloud Accounts** page. * **ACCESS\_TOKEN** - Once you are logged into MechCloud, simply open a new tab, and enter [https://portal.mechcloud.io/oauth2/auth1](https://portal.mechcloud.io/oauth2/auth1) url in the address bar. It will print your access token. * Update timeout to 30 seconds under **Configuration -> General Configuration -> Timeout**. #### [](#id-2.-create-a-layer-with-python-dependencies) 2\. Create a layer with python dependencies Create a layer using instructions available at [https://docs.aws.amazon.com/lambda/latest/dg/python-layers.html](https://docs.aws.amazon.com/lambda/latest/dg/python-layers.html) with the following configuration and upload it under **Layers** section of the lambda function created in previous step - **Python version** - 3.12 **Lambda dependencies** Copy requests==2.32.3 #### [](#id-3.-create-a-fifo-queue) 3\. Create a FIFO queue Create a fifo queue with following details - * **Name** - management-events.fifo * **Type** - FIFO * Make sure **Content-based deduplication** is enabled. * You can adjust other settings as per your need. * Configure the lambda function created in previous step under **Lambda triggers** of this queue. #### [](#id-4.-create-an-event-bridge-rule) 4\. Create an Event Bridge rule Create an event bridge rule with the following details - * **Define rule detail** * **Name** - mc-instance-state-change-events * **Event bus** - default * Make sure that **Enable the rule on the selected event bus** is enabled. * Select **Rule with an event pattern** under **Rule type**. * **Build event pattern** * **Creation method** - Custom pattern (JSON editor) * **Event pattern** Copy { "source": ["aws.ec2"], "detail-type": ["EC2 Instance State-change Notification"] } * **Select target(s)** * **Target 1** * **Target types -** AWS service * **Select a target** - SQS Queue * **Queue** - management-events.fifo * **Message group ID** - mc-instance-state-change-events [PreviousReal-time Visualization](/cloud-computing/cloud-accounts/real-time-visualization) [NextTags](/cloud-computing/cloud-accounts/real-time-visualization/aws/tags) Last updated 5 months ago Was this helpful? ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2F3435649067-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FQGHt89wn8Cn0pcK36Wir%252Fuploads%252FGMKLk33ShUqSBmbxwZAi%252Fimage.png%3Falt%3Dmedia%26token%3Dac3c4bea-2499-47bf-9cfe-5c94205cfcba&width=768&dpr=4&quality=100&sign=29ec26d5&sv=2) --- # REST API Agent | MechCloud [PreviousMulti-operation Prompts](/ai-agents/aws-agent/multi-operation-prompts) [NextCloudflare](/ai-agents/rest-api-agent/cloudflare) Last updated 1 month ago Was this helpful? ### [](#introduction) Introduction MechCloud REST API Agent is a general purpose agent which can be used to query and manage resources in any system which exposes its control plane / administration over a REST API. It has support for the following systems / REST APIs at this moment (this list will be updated from time to time) - * Cloudflare * MongoDB Atlas API **The goal behind this agent is to build a universal agent which can be used with any REST API to query/manage its resources and where onboarding of a new REST API or updating the specification for an already onboarded REST API is fully automated.** It uses [MechCloud OpenID Connect Proxy](https://github.com/mechcloud/mechcloud-oidc-proxy) to invoke the REST API of the target system without storing any short/long term credentials for the target system. MechCloud OIDC Proxy Follow the instructions in the [readme](https://github.com/mechcloud/mechcloud-oidc-proxy/blob/main/README.md) file to deploy this proxy in your Cloudflare account. Instructions for creating an account for a supported system in MechCloud OIDC Proxy can be found on the respective page for a system under this section. ### [](#registering-rest-api-account-in-mechcloud) Registering REST API account in MechCloud Each REST API account registered in MechCloud OIDC proxy must have a unique id which is specified against `id` attribute while registering the account. Make a note of it as it will be required to register this account in MechCloud. * Login to MechCloud [console](https://portal.mechcloud.io) . * Navigate to **Infrastructure -> REST Accounts**. * Click on **New REST Account** button. * Choose a system (e.g. cloudflare, mongodb etc). * Enter a name for the account. * Enter the `id` against **Account ID** field which you had specified while registering this account in MechCloud OIDC proxy. ### [](#smart-context-menu) Smart context menu As you query the resources, these are added to the smart context menu automatically which can be activated by pressing `/` key. This helps you to select and use the name(s) of parent resource(s) in the prompt instead of their ids while querying children resources. This eliminates the need of copying parent resources' ids from the responses of previous prompts while querying children of such resources. E.g. when you query all your accounts for cloudflare using `list all the accounts` prompt, it will display all the accounts associated with your logged in email id and all such accounts will be added to the context menu as well. Now instead of using 'show all list under account' prompt, where `account_id` is the unique id assigned by cloudflare to your account, you can actually type `show all lists under` , press `/` key and choose the desired account from the content menu. This will insert the name of the target account at the current cursor position in `@` format. After querying all the lists under an account, you can then use `list all the items under @ list of @ account` prompt to list all the items in a custom list. However, instead of typing list name and account name in this prompt, you can use smart context menu to insert these automatically. Items in the smart context menu are grouped by resource types (e.g. account, custom list etc). So when you query all account, first group will contain all the accounts. Query custom list under a account will push all children custom lists for a particular account in the second group and so on. Root resources (account in case of cloudflare) are displayed on the top in the context menu and queried direct / indirect children will be shown below the parent resources in their respective group in the smart context menu. ### [](#prompt-variables) Prompt variables You can use following variables in your prompts which will be replaced with corresponding values before posting a prompt to the MechCloud backend. All such variables must be specified in `@` format in the prompt. Variable Purpose `CURRENT_IP` Injecting ip of the machine in a prompt where the prompt is executed from. Useful for updating machine ip in firewall / ip access lists. This eliminates the need of first getting public ip of your local machine and then updating it in a prompt every time local machine ip address changes and you need to update it in various firewall rules / ip access lists etc. ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2Fgithub.com%2Fuser-attachments%2Fassets%2Fa18b8fdf-135d-460d-ada9-04ab404b13f1&width=768&dpr=4&quality=100&sign=293237f7&sv=2) ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2F3435649067-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FQGHt89wn8Cn0pcK36Wir%252Fuploads%252FvHkuGZp87pJ7OnOOTNC2%252Fimage.png%3Falt%3Dmedia%26token%3Dfc3bde3b-79ec-44a1-be8e-8eec5d341855&width=768&dpr=4&quality=100&sign=357f926f&sv=2) --- # AWS Agent | MechCloud [PreviousGCP](/cloud-computing/cloud-accounts/real-time-visualization/gcp) [NextEC2](/ai-agents/aws-agent/ec2) Last updated 1 month ago Was this helpful? AWS agent can be used to manage AWS infrastructure using plain english commands. **It does not require storing any short / long term credentials.** You will need to configure MechCloud IdP as an identity provider in AWS in order to make this integration work without AWS API credentials. ### [](#configure-mechcloud-idp-into-aws-account) Configure MechCloud IdP into AWS Account #### [](#add-an-identity-provider) Add an identity provider Go to **IAM -> Identity providers** and click on **Add provider** button to add an OIDC identity provider with following details - Field Value **Provider URL** **Audience** n6dMQlo8ZCE5QxLY4o2KjeBaSn8eefTX #### [](#create-an-iam-role) Create an IAM role Now assign an IAM role to the newly added **OIDC** provider by following below instructions - * Go to **IAM -> Identity providers** and click on the provider created in the previous section. * Click on A**ssign role** button. * Select **Create a new role** radio button. * Select following details on the next page and click on **Next** button - * Select permissions policies (e.g. [AmazonEC2ReadOnlyAccess](https://us-east-1.console.aws.amazon.com/iam/home?region=ap-south-1#/policies/details/arn%3Aaws%3Aiam%3A%3Aaws%3Apolicy%2FAmazonEC2ReadOnlyAccess) ) on the next page which you want to assign to this role and click on the **Next** button. * Specify **MechCloudWebIdentityRole** (or any other name) under Role name on the next page and click on **Create role** button to create the role. Make sure you replace **MechCloudWebIdentityRole** in following steps if you decide to use a different name for this role. * **(IMPORTANT)** Make sure that you specify a condition under the **Trust relationships** tab of **MechCloudWebIdentityRole** role as shown in the below image so that only users with specific email ids can assume this role. **In the absence of this condition, any user who is logged into MechCloud and knows your AWS account number and the role name will be able to assume this role on your AWS account which can result in unexpected charges if you have assigned permissions to provision AWS resources to this role.** * **(IMPORTANT) Also, make sure to revoke existing sessions whenever you remove a user from the condition highlighted above. This will block the access for those users who were removed from the above condition but still have a valid session token.** ### [](#demo) Demo ### [](#tutorials) Tutorials * [https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-ec2-resources](https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-ec2-resources) * [https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-lightsail-resources](https://blog.mechcloud.io/how-to-use-mechcloud-chatbot-to-manage-your-aws-lightsail-resources) [https://id.mechcloud.io/](https://mechcloud-piston-preview.eu.auth0.com/) ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1729326763321%2F7ab79856-884f-4cdd-9f39-10f72811256f.png&width=768&dpr=4&quality=100&sign=8e93f01c&sv=2) ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1729326228581%2F21b6b322-6b81-49e2-9967-9ddafa0b2251.png&width=768&dpr=4&quality=100&sign=f16dcc5b&sv=2) ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1719851250330%2F1a34e6aa-b179-4707-8bde-6fd69a571a9b.png&width=768&dpr=4&quality=100&sign=697943f4&sv=2) ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2Fcdn.hashnode.com%2Fres%2Fhashnode%2Fimage%2Fupload%2Fv1729325960259%2F76e48415-0545-4775-b5fe-9552a802a422.png&width=768&dpr=4&quality=100&sign=3c14fd78&sv=2) --- # Real-time Visualization | MechCloud In order to visualize your cloud assets across hyperscalers in real time (e.g. you create a vpc using cli or terraform and it shows up in MechCloud in few seconds without you triggering the discovery manually), you will need to post your hyperscaler events to a certain endpoint of MechCloud. Here are the details of this endpoint - **Url** - [https://portal-api.mechcloud.io/mechcloud-turbine-discovery/v1.0/sync/events](https://portal-api.mechcloud.io/mechcloud-turbine-discovery/v1.0/sync/events) **Query parameter(s)** * **cloudAccountId** - This is the unique id which is generated by MechCloud when you register a cloud account. You can get this from MechCloud console -> Infrastructure -> Cloud Accounts page. **Headers** * **Mc-Team-Id** - This is the id generated by MechCloud for a team which a cloud account belongs to. Its value is **d65e32d2-e18f-49a7-8cbf-e19205772ea0** for the default team. * **Referer** - https://portal.mechcloud.io/ * **Content-Type** - application/json * **Authorization** - Bearer * Once you are logged into MechCloud, simply open a new tab, and enter [https://portal-api.mechcloud.io/oauth2/auth1](https://portal-api.mechcloud.io/oauth2/auth1) url in the address bar. It will print your access/jwt token. **Response code(s)** * Any response with 200 status code means event was processed or was a duplicate event and so you can remove such event from the queue. * For any other status code, you can retry it 2-3 times to see if it goes through. If not, then pause the mechanism which is posting events to MechCloud and post your issue in the MechCloud discord server. **It is your responsibility to make sure that events are posted in the correct order. E.g. you should not post an event corresponding to a subnet to MechCloud when the event corresponding to its parent vpc creation has not been posted yet.** Before you can invoke this endpoint, you will need to get a jwt token for your MechCloud account. To fetch you jwt token, make sure you are logged into MechCloud and then enter [https://portal-preview.mechcloud.io/oauth2/auth1](https://portal-preview.mechcloud.io/oauth2/auth1) in a new browser tab. It will fetch your jwt token and display it. Copy this jwt token and replace placehoder in **Authorization** header with it. How to post hyperscaler specific events to MechCloud and the format of these events is described in the respective hyperscaler section under this page. In order to visualize your hyperscaler assets, first you need to follow the instructions under the respective hyperscale section, navigate to **Infrastructure -> Discover Assets** in the MechCloud portal**,** select one or more AWS accounts under **Select cloud accounts** dropdown and then click on **Enable Real-time updates** button. Now go ahead and create a vpc/subnet/vm as per the instruction mentioned in the respective hyperscaler section, make sure it is posted to MechCloud and you get a success response for same. It will then appear on MechCloud UI within few seconds. **Real-time updates are streamed for 25 mins only after enabling it from UI and disabled at the end of this duration automatically. You will need to enable it again if you want to stream real-time updates after it is disabled automatically.** [PreviousDiscover Assets](/cloud-computing/cloud-accounts/discover-assets) [NextAWS](/cloud-computing/cloud-accounts/real-time-visualization/aws) Last updated 8 months ago Was this helpful? --- # Discover Assets | MechCloud [PreviousConfigure Regions / Zones](/cloud-computing/cloud-accounts/configure-regions-zones) [NextReal-time Visualization](/cloud-computing/cloud-accounts/real-time-visualization) Last updated 8 months ago Was this helpful? 1. Log on to [MechCloud](https://portal-preview.mechcloud.io) and navigate to **Infastructure -> Discover Assets**. 2. Select a team. 3. Select one or more cloud account under **Select cloud account** dropdown. 4. Click on **Show Discovered Assets** button to display all the cloud assets which have been discovered already for the selected cloud accounts. 5. Click on **Discover** button to discover the assets for the selected cloud accounts. ### [](#aws) AWS ### [](#gcp) GCP ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2F3435649067-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FQGHt89wn8Cn0pcK36Wir%252Fuploads%252F3Dhq5uN2WyREbl5AzhMX%252Fimage.png%3Falt%3Dmedia%26token%3Dc0ef91e7-f45b-42c6-96f9-3f1126c9d47b&width=768&dpr=4&quality=100&sign=24545b10&sv=2) ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2F3435649067-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FQGHt89wn8Cn0pcK36Wir%252Fuploads%252F1RzrqeKn69YEY2GhQvDD%252FMechCloud%2520Demo%2520%2822-Jan-2024%29%2520Thumbnail.PNG%3Falt%3Dmedia%26token%3D36aa6c32-f034-4089-9b29-6296e61737b4&width=768&dpr=4&quality=100&sign=388cf4d4&sv=2) --- # CloudTrail | MechCloud ### [](#events) Events **Note** **\- Only mandatory attributes have been shown below for various events. You can remove all the attributes other than ones mentioned below (using eventbridge pipe etc) so that any sensitive information (e.g. account number) about your account is NOT posted to MechCloud.** #### [](#id-1.-create-vpc) 1\. Create Vpc Copy { "detail": { "eventSource": "ec2.amazonaws.com", "eventName": "CreateVpc", "awsRegion": "ap-south-1", "responseElements": { "vpc": { "vpcId": "vpc-0cccf79ebe39e344d" } } } } #### [](#id-2.-delete-vpc) 2\. Delete Vpc Copy { "detail": { "eventSource": "ec2.amazonaws.com", "eventName": "DeleteVpc", "awsRegion": "ap-south-1", "requestParameters": { "vpcId": "vpc-0578af3ad4c046a4c" } } } #### [](#id-3.-create-subnet) 3\. Create Subnet Copy { "detail": { "eventSource": "ec2.amazonaws.com", "eventName": "CreateSubnet", "awsRegion": "ap-south-1", "responseElements": { "subnet": { "subnetId": "subnet-0ecb030bb9dff28df" } } } } #### [](#id-4.-delete-subnet) 4\. Delete Subnet Copy { "detail": { "eventSource": "ec2.amazonaws.com", "eventName": "DeleteSubnet", "awsRegion": "ap-south-1", "requestParameters": { "subnetId": "subnet-0f04fcf48a46f8be6" } } } #### [](#id-5.-create-vm) 5\. Create VM Copy { "detail": { "eventSource": "ec2.amazonaws.com", "eventName": "RunInstances", "awsRegion": "ap-south-1", "responseElements": { "instancesSet": { "items": [\ {\ "instanceId": "i-0f376f70fbeb82fde"\ }\ ] } } } } #### [](#id-6.-delete-vm) 6\. Delete VM Copy { "detail": { "eventSource": "ec2.amazonaws.com", "eventName": "TerminateInstances", "awsRegion": "ap-south-1", "requestParameters": { "instancesSet": { "items": [\ {\ "instanceId": "i-0f034f129e90fff61"\ }\ ] } } } } ### [](#steps) Steps #### [](#id-1.-create-a-trail) 1\. Create a trail * Navigate to **CloudTrail -> Trails**. * Click on **Create trail** button to create a new trail with following details. This describes only few settings. You can adjust other settings as per your needs. * **General Details** * **Trail name** - mc-mgmt-events * (Optional) Make sure that **Enable for all accounts in my organization** option is **UNCHECKED as selecting this may result in huge charges.** * **Events** * **Event type** - Make sure ONLY Management events option is CHECKED. * **Management events** * Make sure only **Write** is CHECKED. * Make sure both **Exclude AWS KMS events** and **Exclude Amazon RDS Data API events** are CHECKED. * Select newly created trail and click on **Stop logging** button so that unnecessary events are NOT logged in the S3 button associated with the trail. **A good practice is to enable logging for this trail just before real-time visualization starts and disable it at the end of real-time visualization.** #### [](#id-2.-create-an-event-bridge-rule) 2\. Create an Event Bridge rule Create an event bridge rule with the following details - * **Define rule detail** * **Name** - mc-cloudtrail-events * **Event bus** - default * Make sure that **Enable the rule on the selected event bus** is enabled. * Select **Rule with an event pattern** under **Rule type**. * **Build event pattern** * **Creation method** - Custom pattern (JSON editor) * **Event pattern** Copy { "source": [\ "aws.ec2"\ ], "detail-type": [\ "AWS API Call via CloudTrail"\ ], "detail": { "eventSource": [\ "ec2.amazonaws.com"\ ], "eventName": [\ "CreateVpc",\ "DeleteVpc",\ "CreateSubnet",\ "DeleteSubnet",\ "RunInstances",\ "StartInstances",\ "StopInstances",\ "RebootInstances",\ "TerminateInstances"\ ] } } * **Select target(s)** * **Target 1** * **Target types -** AWS service * **Select a target** - SQS Queue * **Queue** - management-events.fifo * **Message group ID** - mc-cloudtrail-events [PreviousTags](/cloud-computing/cloud-accounts/real-time-visualization/aws/tags) [NextGCP](/cloud-computing/cloud-accounts/real-time-visualization/gcp) Last updated 8 months ago Was this helpful? --- # Layout | MechCloud A layout is a vuejs component responsible for rendering a layout (e.g. two columns) which is common across a number of pages of a site. A layout can be assigned to one or more labels where child nodes under all such labels are required to have same layout. All top level site nodes (**Administration, Infrastructure, Chatbots and Site Builder**) in the MechCloud portal application shared a layout which is two columns layout. A layout uses `` tag as a placeholder to render the content of a site node under a label similar to how a frame uses this tag to render the content of a page. [PreviousFrame](/website-builder/custom-components/frame) [NextExternal Page](/website-builder/custom-components/external-page) Last updated 1 month ago Was this helpful? --- # EC2 | MechCloud [PreviousAWS Agent](/ai-agents/aws-agent) [NextLightsail](/ai-agents/aws-agent/lightsail) Last updated 13 days ago Was this helpful? ### [](#heading-supported-opertions) Supported operations Operation Permissions Required Example Prompts List vpcs ec2:DescribeVpcs Create vpc ec2:CreateVpc Delete vpc ec2:DeleteVpc List subnets ec2:DescribeSubnets Create subnet ec2:CreateSubnet Delete subnet ec2:DeleteSubnet List instances ec2:DescribeInstances Provision instances ec2:RunInstances Start instances ec2:StartInstances Stop instances ec2:StopInstances Describe instance types ec2:DescribeInstanceTypes Copy list all the vpcs list all the vpcs which are not default Copy create a vpc with '10.101.0.0/16' cidr Copy delete a vpc with '' id Copy list all the subnets list all the subnets which are not default list all the subnets under '' vpc Copy create a subnet with '10.101.1.0/24' cidr under '' id Copy delete a subnet with '' id Copy list all the ec2 vms Copy Provision an ec2 vm with following details - subnet id - ami id - instance type - t2.micro min count - 1 max count - 1 Copy Start ec2 vms with following ids - Copy Stop ec2 vms with following ids - Copy list all the instance types which are free tier eligible --- # Site Node | MechCloud [PreviousSite](/website-builder/site) [NextCustom Components](/website-builder/custom-components) Last updated 1 month ago Was this helpful? A site node represent any node in the site hierarchy. ### [](#parameters) Parameters Parameter Description Tutorials / Demos / Sample Code **Node Type** Each site node can either be a **Page** or **Label.** A label is used for grouping site nodes where each child site node can either be a label or a page. **Page Type** A Page can be of two types - **Internal** or **External**. **Internal pages** can be designed using Site Builder's built in page designer. On the other hand **external pages** are consumed from a micro app. External pages are coded by the developers and suitable for those requirements where a page is very complex and so can't be designed using built-in page designer. **External Page** A vuejs component which is loaded from the micro app and which can be used to code any complex page which can't be designed using page designer. Must be registered under the (unmanaged) parent team of this site node or under the parent team of this site node's (managed) parent team. **This will be visible only when page type is External.** **Layout** A vuejs component which which is loaded from a micro app and renders the site nodes under this label within it. Must be registered under the (unmanaged) parent team of this site node or under the parent team of this site node's (managed) parent team. **This will be visible for a site node of type Label only.** [https://github.com/mechcloud/mechcloud-demo-microapp1/tree/main/src/components/layouts](https://github.com/mechcloud/mechcloud-demo-microapp1/tree/main/src/components/layouts) --- # Micro app based architecture | MechCloud [PreviousRouting](/website-builder/routing) [NextSite](/website-builder/site) Last updated 1 month ago Was this helpful? MechCloud site builder has first class support for micro app architecture which is quite similar to micro frontend architecture. Unlike micro frontend, a micro app in MechCloud can have vuejs components only. **Micro app architecture is what makes MechCloud stand out from other no / low code tools as you will never run into a situation where you will not be able to onboard a page in MechCloud irrespective of the complexity of the page. This is a serious limitation in most of the no/low code tools out there.** Micro apps are used to make custom components (**Frame**, **Layout**, **External Page** and **Component**) developed by third parties available to the sites created using MechCloud site builder. These custom components can be consumed by a MechCloud site by running micro apps either on a remote location (e.g. cloudflare pages) for production or on a local machine during the development phase. Partner driven micro app architecture (1) ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2Fdocs.google.com%2Fdrawings%2Fd%2Fe%2F2PACX-1vT8jPe1Cm9MEe6OQ1VoG-YFgS7iAF9Xunlo1ABkluh13oKun-X75kLGjs54aVnmYijcW0FRMo7VUr4s%2Fpub%3Fw%3D959%26h%3D672&width=768&dpr=4&quality=100&sign=2bc2e30c&sv=2) --- # Frame | MechCloud A custom frame is a vuejs component that serves as the root component for a website, rendering common elements like headers and footers across all pages. It functions similarly to a WordPress theme, providing a consistent layout and design throughout the site. One must assign a frame to a site while creating it in the site builder. The frame utilizes a special component called `McRenderNode`, which acts as a placeholder for dynamic content. When a specific page is requested, MechCloud injects the page's content into the frame at the location of the `` tag. This approach ensures that while the frame maintains consistent elements like the header and footer, the main content area is dynamically populated based on the requested page. Additionally, custom frames can incorporate navigation elements using components like `McNavigationLink`. This component facilitates the creation of top-level navigation by linking to different site nodes, enhancing the user experience with intuitive site traversal. By developing custom frames, developers can define the overarching structure and appearance of their MechCloud sites, ensuring a cohesive and dynamic user experience across all pages. ### [](#parameters) Parameters [PreviousCustom Components](/website-builder/custom-components) [NextLayout](/website-builder/custom-components/layout) Last updated 1 month ago Was this helpful? --- # | MechCloud This component is used to generate a link to a site page from another component (e.g. site header). This tag is equivalent of **** tag of Vue router for Piston components. This tag exposes three properties which we will understand in detail with the help of examples - Copy * **title** \- This prop renders the label for the navigation link. * **uriPrefix** \- This prop represents the uri of the parent node relative to the url of a MechCloud site. * **mapping** \- This prop captures the mapping for this node. Let's say you want to create a link to a first level site node with **Administration** as title and **administration** as mapping. You can generate a link to such a site node using following code - Copy If **Administration** node is having a child node with **Teams** as title and mapping as **teams** then you can create a link for same using following code - Copy If **Teams** node is having a child node with **Users** as title and mapping as **users** then you can create a link for same using following code - Copy [PreviousSpecial Tags](/website-builder/special-tags) [Next](/website-builder/special-tags/less-than-mc-render-node-greater-than) Last updated 6 months ago Was this helpful? --- # External Page | MechCloud Many times it is not possible to design a page using page designer because the page is quite complex. To support such requirements, site builder suports external pages. These pages are coded by the developers and consumed using a micro app. **Due to this you will never run into a situation where you will not be able to create a page of any complexity in MechCloud.** **No support for complex pages is a limitation which exists into most of the no or low code site builders out there**. [PreviousLayout](/website-builder/custom-components/layout) [NextComponent](/website-builder/custom-components/component) Last updated 1 month ago Was this helpful? --- # GCP | MechCloud [PreviousCloudTrail](/cloud-computing/cloud-accounts/real-time-visualization/aws/cloudtrail) [NextAWS Agent](/ai-agents/aws-agent) Last updated 1 year ago Was this helpful? **Real-time visualization is only supported for vpc, subnet and virtual server resource types as of today (Feb 08, 2024).** ### [](#changelog) Changelog #### [](#feb-8-2024) Feb 8, 2024 * Created initial version descripting steps for setting up real-time visualization of GCP assets (vpc, subnet and vm). #### [](#feb-10-2024) Feb 10, 2024 * Updated instructions. ### [](#steps-for-setting-up-real-time-updates) Steps for setting up real-time updates #### [](#id-1.-create-a-topic) 1\. Create a topic * Go to console -> topics (use search bar to jump to this). * Add a topic with **mc-mgmt-events** id (see below screenshot for other details) * Click on newly created topic in the list of topics and then click on **TRIGGER CLOUD FUNCTION** link. * Create a function with details as follows - * **Basics** * Environment - 2nd gen * Function name - process-mc-events * Region - Choose a region of your choice * **Trigger** - Leave it unchanged ( make sure it is having topic created in the previous step selected under **Cloud Pub/Sub topic** field. * **Runtime, build, connections and security settings (Choose other settings as per your convenience)** * **Runtime** * **Timeout -** 30 seconds * **Runtime environment variables** - * **TEAM\_ID** - d65e32d2-e18f-49a7-8cbf-e19205772ea0 * **CLOUD\_ACCOUNT\_ID** - You can get this from **MechCloud console -> Infrastructure -> Cloud Accounts** page. * **ACCESS\_TOKEN** - Once you are logged into MechCloud, simply open a new tab, and enter [https://portal-preview.mechcloud.io/oauth2/auth1](https://portal-preview.mechcloud.io/oauth2/auth1) url in the address bar. It will print your access/jwt token. * **Connections** * Ingress Settings **-** Allow internal traffic only * **Source code** * **Runtime** - Python 3.12 * **Entry point** - process\_event * **Source code** - Inline editor * Make sure requirements.txt has following additional modules - * requests==2.31.0 * Add following code under main.py file- Copy import functions_framework, json, logging, base64, os, requests @functions_framework.cloud_event def process_event(cloud_event): try: print(cloud_event) event = base64.b64decode(cloud_event.data["message"]["data"]) event_str = event.decode('utf-8') print('Event : ' + event_str) event_json = json.loads(event) service_name = event_json['protoPayload']['serviceName'] method_name = event_json['protoPayload']['methodName'] print("Service : '{}', Method : '{}'".format(service_name, method_name)) team_id = os.environ.get('TEAM_ID') if not team_id: raise ValueError("TEAM_ID environment variable is missing") cloud_account_id = os.environ.get('CLOUD_ACCOUNT_ID') if not cloud_account_id: raise ValueError("ACCOUNT_ID environment variable is missing") access_token = os.environ.get('ACCESS_TOKEN') if not access_token: raise ValueError("ACCESS_TOKEN environment variable is missing") endpoint_url = f"https://mechcloud-preview-asia.mechcloud.io/mechcloud-turbine-discovery/v1.0/sync/events?cloudAccountId={cloud_account_id}" headers = { 'Authorization': f"Bearer {access_token}", 'Mc-Team-Id': f"{team_id}", 'Referer': 'https://portal-preview.mechcloud.io/', 'Content-Type': 'application/json' } response = requests.post( endpoint_url, headers=headers, timeout=(5, 30), data=event_str ) status_code = response.status_code print('Status code : ' + str(status_code)) print('Response : ' + response.text) if status_code == 200: return f"OK" else: return f"Not OK" except Exception as ex: print('Exception occured.') logging.error(ex, exc_info=True) return f"Not OK" #### [](#id-2.-create-log-routing-sinks) 2\. Create log routing sinks To visualize GCP resource in real-time, we will need to create one log routing sink per resource type (e.g. vpc). You can add a log routing sink by going to console -> logging (use search bar to jump to this) -> Log router and click on **Create sink** link to add a sink. Make sure you have following log routing sinks created - Sink Name Sink Destination Logs to include in sink mc-vpc-mgmt-events **Service** - Cloud Pub/Sub topic **Topic** - projects//topics/mc-mgmt-events resource.type="gce\_network" protoPayload.methodName="beta.compute.networks.insert" OR protoPayload.methodName="v1.compute.networks.insert" OR protoPayload.methodName="beta.compute.networks.delete" OR protoPayload.methodName="v1.compute.networks.delete" mc-subnet-mgmt-events **Service** - Cloud Pub/Sub topic **Topic** - projects//topics/mc-mgmt-events resource.type="gce\_subnetwork" protoPayload.methodName="beta.compute.subnetworks.insert" OR protoPayload.methodName="v1.compute.subnetworks.insert" OR protoPayload.methodName="beta.compute.subnetworks.delete" OR protoPayload.methodName="v1.compute.subnetworks.delete" mc-vm-mgmt-events **Service** - Cloud Pub/Sub topic **Topic** - projects//topics/mc-mgmt-events resource.type="gce\_instance" protoPayload.methodName="beta.compute.subnetworks.insert" OR protoPayload.methodName="v1.compute.instances.insert" OR protoPayload.methodName="beta.compute.instances.delete" OR protoPayload.methodName="v1.compute.instances.delete" OR protoPayload.methodName="beta.compute.instances.start" OR protoPayload.methodName="v1.compute.instances.start" OR protoPayload.methodName="beta.compute.instances.stop" OR protoPayload.methodName="v1.compute.instances.stop" ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2F3435649067-files.gitbook.io%2F%7E%2Ffiles%2Fv0%2Fb%2Fgitbook-x-prod.appspot.com%2Fo%2Fspaces%252FQGHt89wn8Cn0pcK36Wir%252Fuploads%252FFJjBanG6NTvfd0usdYMX%252Fimage.png%3Falt%3Dmedia%26token%3D5b9b5c5f-6f8f-46d2-a72d-c674025c3dae&width=768&dpr=4&quality=100&sign=618da706&sv=2) --- # Site | MechCloud [PreviousMicro app based architecture](/website-builder/micro-app-based-architecture) [NextSite Node](/website-builder/site-node) Last updated 1 month ago Was this helpful? A site represents a hierarchy of site nodes where each site node can either be a **Page** or **Label**. Each site represents a fully static or dynamic or a hybrid website where some pages are static while others are dynamic. These dynamic pages render dynamic content using **external pages** or **components** from a micro app. MechCloud site builder micro app components ### [](#parameters) Parameters Parameter Description Tutorials / Demos **Mapping** This is the last token in the site url (/sites/). This must be unique for all the sites in a tenant. **Protected** A protected site can be accessed by the site admin only in an unshared team and by all the team members in a shared team. **Frame** A vuejs component responsible for rendering commons areas across all the pages of a site. Must be registered under the (unmanaged) parent team of this site or under the parent team of this site's (managed) parent team. ![](https://docs.mechcloud.io/~gitbook/image?url=https%3A%2F%2Fdocs.google.com%2Fdrawings%2Fd%2Fe%2F2PACX-1vRaug9Iyj2qu9ryhhoNP80RseqBbQA_7IiiC6IrE4w19_pTG1FQ0E-Qs7Ycz8hGzFBOEtlGWuAes2yU%2Fpub%3Fw%3D1055%26h%3D507&width=768&dpr=4&quality=100&sign=c7b8fa38&sv=2) --- # | MechCloud This tag is used in a frame or layout component as a placeholder to inject other components. This tag is equivalent of **** tag of the vue-router for Piston components. When used in a theme component, it will render either a layout or a page at the time of rendering the complete page in the browser window. When used in a layout component, it will render a page component in the browser window at the time of rendering. [Previous](/website-builder/special-tags/less-than-mc-navigation-link-greater-than) [NextPage Designer](/website-builder/page-designer) Last updated 6 months ago Was this helpful? ---