# Onboarding Guide

**GETTING STARTED — Code to Cloud**

> **Permission Requirement:** Platform Admin role required.

Bring your application from source code to a live cloud deployment. This guide walks you through connecting your repository, configuring your cloud target, and running your first automated pipeline.

## **Before You Begin**

* **Personal Access Token for your source control provider** — Needs repo-level read access and, if applicable, org-level read access.
* **Cloud provider credentials configured**&#x20;
* **IDE with MCP support** — VS Code with the Claude extension, or Cursor.

## **Pipeline Setup — Step by Step**

**Step 1 — Connect the MCP Server**

In your IDE, open the MCP configuration panel and connect the Opsera MCP server. Once connected, the agent will appear as an active Dev MCP connection and you are ready to proceed.

**Step 2 — Trigger the Agent with Your Project Path**

Open a new agent chat in your IDE. Invoke the Code to Cloud MCP tool and provide the path to your project. The agent will begin analysing your repository immediately.

The MCP tool to invoke depends on your deployment type:

* `code-to-cloud-web` — for standard web application deployments
* `code-to-cloud-enterprise` — for enterprise-grade deployments

Example:

```
/user-opsera/code-to-cloud-web
```

The agent immediately begins reading your repository — detecting your tech stack, port, branch, existing Dockerfiles, Kubernetes manifests, and Helm charts. It reports exactly what it found and what it will auto-generate if anything is missing.

**Step 3 — Answer the Guided Setup Questions**

The agent walks you through a structured conversation shaped by what it found in your code. The questions are specific to your repository — not the same for every app.

Questions typically cover:

* **App name** — The agent suggests one from your repo name; confirm or provide your own.
* **Target environment** — dev, test, uat, prod, or custom.
* **Cloud provider** — AWS (EKS + ECR) or Azure.
* **AWS profile** — The agent lists all profiles found on your machine; you select which one to use. Region and account are auto-detected from the selected profile.
* **EKS cluster and ECR repository** — Discovered automatically from your selected profile. You choose which cluster to deploy to and whether to use an existing ECR repo or create a new one.
* **Deployment asset handling** — How to manage your Dockerfile and deployment manifests. If the agent finds existing Kubernetes manifests, it asks how you want to use them. If nothing exists, it offers to generate a full Helm chart. Options are tailored to what's in your repo.
* **Security scanning (optional)** — Enable SonarQube code quality scanning and/or Grype container vulnerability scanning if needed for your pipeline.

> You are not asked to provide cluster names, registry URLs, namespaces, ingress settings, or region codes — the agent resolves all of these automatically from your answers.

**Step 4 — Review and Confirm the Deployment Plan**

Once you have answered all questions, the agent presents a full deployment plan summary before creating anything. This covers pipeline name, app name, environment, cloud, cluster, registry, namespace, ingress pattern, deployment URL, branch, workflow stages, and which secrets will need to be configured.

Review the plan and type `yes` to confirm. The agent then:

* Creates the pipeline in the Opsera backend
* Pre-fills all 35+ pipeline variables automatically
* Generates the deployment script
* Returns a **Configure Secrets in Portal** link

**Step 5 — Configure Secrets in the Portal**

Navigate to the portal link provided by the agent. Enter the credential secrets that cannot be auto-detected from your environment. Common secrets include:

* `GIT_PAT` — GitHub Personal Access Token
* `AWS_ACCESS_KEY_ID` and `AWS_SECRET_ACCESS_KEY` — AWS credentials
* `SONAR_TOKEN` — SonarQube authentication token (only if SonarQube was enabled)

All other pipeline variables are already pre-filled. Only credentials require manual entry.

**Step 6 — Deploy**

Return to the IDE agent chat and type:

```
deploy
```

The pipeline runs end to end — clone, build, push, deploy — and your app goes live. The deployment URL is shown on completion.

Subsequent runs can also be triggered from the Opsera portal using the **Run Pipeline** button, or automatically on every git push by configuring a webhook from the pipeline's **Webhook** tab.

**Step 7 — Monitor and Manage**

Open the Opsera portal and navigate to **Code-to-Cloud → Pipelines** to find your pipeline.

After your first run you can:

* View run history and per-stage logs from the **Runs** tab
* Access your live deployment URL directly from any successful run record
* Trigger manual runs or re-runs using the **Run Pipeline** button
* Set up automatic triggering on git push from the **Webhook** tab
* Review the full pipeline configuration from the **Blueprint** tab
* Update any pipeline variable or secret without recreating the pipeline from the **Variables** tab
* View a chronological audit log of all pipeline events from the **Activity** tab


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.agents.opsera.ai/code-to-cloud/onboarding-guide.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
