ifdef::env-github[]
:tip-caption: :bulb:
:note-caption: :information_source:
:important-caption: :heavy_exclamation_mark:
:caution-caption: :fire:
:warning-caption: :warning:
:example-tanzu-default: link:../tanzu-default[Tanzu Default]
endif::[]
ifndef::env-github[]
:example-tanzu-default: link:../tanzu-default[Tanzu Default]
endif::[]

[[examples-tanzu-airgap]]
== Tanzu Airgap
This sample demonstrates how everything is deployed as _airgapped_
environment. While using _GitHub Container Registry_ is not exactly
running cluster without internet access it shows how everything is
coming from a defined registry which could be one in your _kubernetes_
cluster.

Follow instructions in {example-tanzu-default} to setup package repository.

Install _Dataflow_ with configured _GitHub Container Registry_ secrets:
[source, bash]
----
tanzu package install scdf-demo \
  --package-name scdf.tanzu.vmware.com \
  --version 2.11.0-SNAPSHOT \
  --values-file scdf-values.yml
----

[IMPORTANT]
====
Change `user` and `secret` to match your own github credentials as
values file _scdf-values.yml_ just have placeholders.
====

Copy source, sink and task:
[source, bash]
----
imgpkg copy \
  -b springcloud/scdf-oss-repo:2.11.0-SNAPSHOT \
  --to-repo ghcr.io/jvalkeal/private/scdf-oss-repo

imgpkg copy \
  -i springcloudstream/time-source-rabbit:3.0.1 \
  --to-repo ghcr.io/jvalkeal/private/time-source-rabbit

imgpkg copy \
  -i springcloudstream/log-sink-rabbit:3.0.1 \
  --to-repo ghcr.io/jvalkeal/private/log-sink-rabbit

imgpkg copy \
  -i springcloudtask/timestamp-task:2.1.1.RELEASE \
  --to-repo ghcr.io/jvalkeal/private/timestamp-task
----

[IMPORTANT]
====
Change _ghcr.io_ to point to your own registry. Also make sure images are public.
====

Import applications using coordinates:
[source, bash]
----
source.time=docker:ghcr.io/jvalkeal/private/time-source-rabbit:3.0.1
sink.log=docker:ghcr.io/jvalkeal/private/log-sink-rabbit:3.0.1
task.timestamp=docker:ghcr.io/jvalkeal/private/timestamp-task:2.1.1.RELEASE
----

[IMPORTANT]
====
Change _ghcr.io_ to point to your own registry.
====
