diff --git a/DEPLOYING.md b/DEPLOYING.md index 9695283..d462787 100644 --- a/DEPLOYING.md +++ b/DEPLOYING.md @@ -2,36 +2,21 @@ > NOTE: The provided `config/workload.yaml` file uses the Git URL for this sample. When you want to modify the source, you must push the code to your own Git repository and then update the `spec.source.git` information in the `config/workload.yaml` file. -## Deploying to Kubernetes as a TAP workload with Tilt - -You can containerize this template app and deploy it as a Tanzu Application Platform (TAP) workload. -You need to have TAP installed on your cluster. -See the [VMware Tanzu Application Platform documentation](https://docs.vmware.com/en/VMware-Tanzu-Application-Platform/index.html) for details. - -We have included a `Tiltfile` file to make this easier when deploying to a cluster. - -For best results use Tilt version v0.23.2 or later. You can install Tilt by following these instructions: https://docs.tilt.dev/install.html - -To set up the deployment environment set the CURRENT_CONTEXT environment variable. - -Set CURRENT_CONTEXT using: - -``` -export CURRENT_CONTEXT=$(kubectl config current-context) -``` +## Deploying to Kubernetes as a TAP workload with Tanzu CLI -To build and deploy the app run: +When you are done developing your app, you can simply deploy it using: ``` -tilt up +tanzu apps workload apply -f config/workload.yaml ``` -and follow the instructions (hitting space bar brings up the Tilt interface in your browser). - -To uninstall the app run: +If you would like deploy the code from your local working directory you can use the following command: ``` -tilt down +tanzu apps workload create node-express -f config/workload.yaml \ + --local-path . \ + --source-image /node-express-source \ + --type web ``` ## Accessing the app deployed to your cluster @@ -47,20 +32,3 @@ tanzu apps workload get node-express To access the deployed app open the URL shown in your browser. This depends on the TAP installation having DNS configured for the Knative ingress. - -## Deploying to Kubernetes as a TAP workload with Tanzu CLI - -When you are done developing your app, you can simply deploy it using: - -``` -tanzu apps workload apply -f config/workload.yaml -``` - -If you would like deploy the code from your local working directory you can use the following command: - -``` -tanzu apps workload create node-express -f config/workload.yaml \ - --local-path . \ - --source-image /node-express-source \ - --type web -``` diff --git a/Tiltfile b/Tiltfile deleted file mode 100644 index c1198a0..0000000 --- a/Tiltfile +++ /dev/null @@ -1,15 +0,0 @@ -allow_k8s_contexts(os.getenv("CURRENT_CONTEXT", default='kind-kind')) - -NAMESPACE = os.getenv("NAMESPACE", default='default') - -k8s_custom_deploy( - 'node-express', - apply_cmd="tanzu apps workload apply -f config/workload.yaml " + - " --namespace " + NAMESPACE + - " --yes >/dev/null" + - " && kubectl get workload node-express --namespace " + NAMESPACE + " -o yaml", - delete_cmd="tanzu apps workload delete -f config/workload.yaml --namespace " + NAMESPACE + " --yes", - deps=['package.json', 'server.js'], -) - -k8s_resource('node-express', extra_pod_selectors=[{'serving.knative.dev/service': 'node-express'}]) diff --git a/accelerator.yaml b/accelerator.yaml index 469ef05..266f7e7 100644 --- a/accelerator.yaml +++ b/accelerator.yaml @@ -18,7 +18,7 @@ accelerator: engine: merge: - include: [ "**" ] - exclude: [ "package.json", "config/**", "catalog/**", "README.md", "DEPLOYING.md", "TILTFILE" ] + exclude: [ "package.json", "config/**", "catalog/**", "README.md", "DEPLOYING.md" ] - include: [ "package.json" ] chain: - type: ReplaceText @@ -39,13 +39,6 @@ engine: substitutions: - text: node-express with: "#artifactId" - - include: [ "Tiltfile" ] - condition: "#includeTap" - chain: - - type: ReplaceText - substitutions: - - text: node-express - with: "#artifactId" - name: README type: Combo onConflict: Append