Skip to content

docs: add air-gapped apiops setup walkthroughs for GitHub Actions and Azure DevOps#77

Open
Copilot wants to merge 8 commits into
mainfrom
copilot/verify-local-npm-package-support
Open

docs: add air-gapped apiops setup walkthroughs for GitHub Actions and Azure DevOps#77
Copilot wants to merge 8 commits into
mainfrom
copilot/verify-local-npm-package-support

Conversation

Copy link
Copy Markdown

Copilot AI commented May 19, 2026

Added operator-focused walkthroughs for running apiops in restricted networks where CI agents/runners cannot reach npm at runtime. The docs now explicitly cover local package bootstrapping and pipeline behavior for both GitHub Actions and Azure DevOps.

  • New walkthroughs (docs/walkthrough/)

    • air-gapped-github-actions.md
    • air-gapped-azure-devops.md
    • Each guide covers:
      • preparing and transferring a local apiops tarball
      • generating and committing package-lock.json
      • offline dependency strategy (npm ci --offline) and cache/feed options
      • self-hosted runner/agent prerequisites
      • provider-specific pipeline/workflow adjustments for air-gapped execution
  • Behavior alignment with current init semantics

    • Documentation now reflects that apiops init --cli-package <path> stages the tarball and writes a local file: dependency in package.json.
    • Clarifies that generated CI definitions use npm ci, which consumes the local package via package.json/lockfile resolution.
  • Docs navigation update

    • Updated docs/README.md:
      • added Walkthroughs to Quick Links
      • added docs/walkthrough/ to the documentation tree for discoverability
apiops init \
  --ci github-actions \
  --cli-package ./peterhauge-apiops-cli-<version>.tgz \
  --environments dev,prod \
  --non-interactive

Copilot AI and others added 4 commits May 19, 2026 22:32
…Azure DevOps

Add step-by-step guides under docs/walkthrough/ covering:
- Tarball preparation with --cli-package flag
- Lock file strategy for offline npm ci
- Self-hosted runner/agent configuration
- Workflow/pipeline modifications for offline operation
- Upgrade procedures and troubleshooting

Update docs/README.md navigation with new walkthrough section.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: EMaher <9244742+EMaher@users.noreply.github.com>
- Merged inbox/docwriter-airgapped-walkthroughs.md into decisions.md
- Established walkthrough pattern for complex multi-step deployment scenarios
- Covers GitHub Actions and Azure DevOps air-gapped deployments
- Pattern: docs/walkthrough/ (scenario-based), docs/ci-cd/ (reference), docs/guides/ (feature-oriented)
- Deleted merged inbox file

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: EMaher <9244742+EMaher@users.noreply.github.com>

| Requirement | Details |
|-------------|---------|
| **Connected workstation** | A machine with internet access to download packages |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole point is an air gapped environment. Isn't there a way to have a local intranet npm registry?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in a4f5edb. The walkthrough now uses a local intranet npm registry (Azure Artifacts feed) as the primary/default pattern, with tarball + offline cache as fallback only.

|-------------|---------|
| **Connected workstation** | A machine with internet access to download packages |
| **Node.js 22.x** | Installed on both the workstation and the agent |
| **npm 10+** | Comes with Node.js 22 |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this line if it comes with prerequisite

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a4f5edb. I removed the separate npm prerequisite line and folded it into the Node.js prerequisite.

| **Connected workstation** | A machine with internet access to download packages |
| **Node.js 22.x** | Installed on both the workstation and the agent |
| **npm 10+** | Comes with Node.js 22 |
| **Self-hosted Azure Pipelines agent** | Registered in your agent pool, running in the air-gapped network |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add link to official documentation.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added in a4f5edb. I linked official Microsoft docs for self-hosted agents and Azure Artifacts npm feed setup.

| **Node.js 22.x** | Installed on both the workstation and the agent |
| **npm 10+** | Comes with Node.js 22 |
| **Self-hosted Azure Pipelines agent** | Registered in your agent pool, running in the air-gapped network |
| **Azure connectivity from agent** | The agent must reach your APIM instance's ARM endpoint (network-level, not npm) |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a document about on premises installs or sovereign clouds?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes—added in a4f5edb. There is now a dedicated “Sovereign Clouds and On-Premises” section linking Azure DevOps Server install docs and national cloud endpoint guidance.

| **npm 10+** | Comes with Node.js 22 |
| **Self-hosted Azure Pipelines agent** | Registered in your agent pool, running in the air-gapped network |
| **Azure connectivity from agent** | The agent must reach your APIM instance's ARM endpoint (network-level, not npm) |
| **Transfer mechanism** | USB drive, Azure Artifacts upstream feed, or approved file share for moving packages into the restricted zone |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done in a4f5edb. I removed that transfer-mechanism prerequisite line.


---

## Step 1 — Prepare the Tarball (Connected Workstation)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update this to talk about using local npm registry.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated in a4f5edb. Step 1 now explicitly covers configuring a local npm registry first (Azure Artifacts feed) and uses tarball flow only as fallback.


Copy the entire npm cache directory (or the `_cacache` subfolder) to your transfer media.

> **Alternative — Azure Artifacts upstream feed:** If your air-gapped network has an Azure Artifacts feed with an upstream source configured (accessible during a controlled sync window), you can use it as a local npm registry instead of transferring the cache manually. Configure `.npmrc` to point to the feed.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assume this is the default path.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Handled in a4f5edb. The local registry path is now assumed as default flow; the Azure Artifacts section was moved into the main steps and the tarball flow is fallback.


### `pipelines/run-extractor.yaml`

```yaml
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm worried about this getting out of date with the default pipelines.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed in a4f5edb. I removed large copied YAML blocks and replaced them with minimal durable edits that reference the generated default pipeline files to reduce drift risk.

- Make local npm registry (Azure Artifacts) the primary approach
- Demote tarball flow to fallback section
- Remove redundant npm and transfer mechanism prerequisites
- Add official Microsoft docs links (agents, feeds, on-prem, sovereign clouds)
- Replace brittle embedded YAML with edit guidance referencing generated files
- Add sovereign clouds and on-premises section

Closes #44

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Co-authored-by: EMaher <9244742+EMaher@users.noreply.github.com>
Copilot finished work on behalf of EMaher May 19, 2026 23:15
Copilot AI requested a review from EMaher May 19, 2026 23:15
@EMaher EMaher marked this pull request as ready for review May 21, 2026 19:27
@EMaher EMaher requested a review from petehauge May 21, 2026 19:29

Commit `package-lock.json` to the repository. The command `npm ci --offline` requires it.

Then transfer the npm cache to the agent:
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

in my testing - this wasn't needed... The npm command (as long as it was already available on the runner) would just use the tgz file and install it to the cache... I would think that the npmcacache.tar.gz would be needed only if there are other npm packages?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants