forked from f5devcentral/f5-xc-terraform-examples
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
751 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
name: "Deploy Gen AI on F5 XC Appstack and Managed k8s" | ||
|
||
on: | ||
push: | ||
branches: | ||
- deploy-genai-appstack | ||
pull_request: | ||
|
||
jobs: | ||
terraform_xc: | ||
name: "Deploy F5XC Appstack and Managed k8s" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./workflow-guides/smcn/genai-inference-at-the-edge/terraform | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v3 | ||
with: | ||
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | ||
|
||
- name: Setup Terraform Backend | ||
id: backend | ||
run: | | ||
cat > backend.tf << EOF | ||
terraform { | ||
cloud { | ||
organization = "${{ secrets.TF_CLOUD_ORGANIZATION }}" | ||
workspaces { | ||
name = "${{ secrets.TF_CLOUD_WORKSPACE_APPSTACK }}" | ||
} | ||
} | ||
} | ||
EOF | ||
echo "${{secrets.P12}}" | base64 -d > api.p12 | ||
#cat api.p12 | ||
- name: Terraform Init | ||
id: init | ||
run: terraform init | ||
|
||
- name: Terraform Validate | ||
id: validate | ||
run: terraform validate -no-color | ||
|
||
- name: Terraform Plan | ||
id: plan | ||
if: github.event_name == 'pull_request' | ||
run: terraform plan -no-color -input=false | ||
continue-on-error: true | ||
|
||
- uses: actions/github-script@v6 | ||
if: github.event_name == 'pull_request' | ||
env: | ||
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const output = `#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\` | ||
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\` | ||
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\` | ||
<details><summary>Show Plan</summary> | ||
\`\`\`\n | ||
${process.env.PLAN} | ||
\`\`\` | ||
</details> | ||
*Pushed by: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: output | ||
}) | ||
- name: Terraform Plan Status | ||
if: steps.plan.outcome == 'failure' | ||
run: exit 1 | ||
|
||
- name: Terraform Apply | ||
if: github.ref == 'refs/heads/deploy-genai-appstack' && github.event_name == 'push' | ||
run: terraform apply -auto-approve -input=false | ||
env: | ||
TF_VAR_aws_access_key: ${{ secrets.aws_access_key }} | ||
TF_VAR_aws_secret_key: ${{ secrets.aws_secret_key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,85 @@ | ||
name: "Destroy Gen AI on F5 XC Appstack and Managed k8s" | ||
|
||
on: | ||
push: | ||
branches: | ||
- destroy-genai-appstack | ||
pull_request: | ||
|
||
jobs: | ||
terraform_xc: | ||
name: "Destroy F5XC Appstack and Managed k8s" | ||
runs-on: ubuntu-latest | ||
defaults: | ||
run: | ||
working-directory: ./workflow-guides/smcn/genai-inference-at-the-edge/terraform | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Terraform | ||
uses: hashicorp/setup-terraform@v3 | ||
with: | ||
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | ||
|
||
- name: Setup Terraform Backend | ||
id: backend | ||
run: | | ||
cat > backend.tf << EOF | ||
terraform { | ||
cloud { | ||
organization = "${{ secrets.TF_CLOUD_ORGANIZATION }}" | ||
workspaces { | ||
name = "${{ secrets.TF_CLOUD_WORKSPACE_APPSTACK }}" | ||
} | ||
} | ||
} | ||
EOF | ||
echo "${{secrets.P12}}" | base64 -d > api.p12 | ||
- name: Terraform Init | ||
id: init | ||
run: terraform init | ||
|
||
- name: Terraform Validate | ||
id: validate | ||
run: terraform validate -no-color | ||
|
||
- name: Terraform Plan | ||
id: plan | ||
if: github.event_name == 'pull_request' | ||
run: terraform plan -no-color -input=false | ||
continue-on-error: true | ||
|
||
- uses: actions/github-script@v6 | ||
if: github.event_name == 'pull_request' | ||
env: | ||
PLAN: "terraform\n${{ steps.plan.outputs.stdout }}" | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const output = `#### Terraform Initialization ⚙️\`${{ steps.init.outcome }}\` | ||
#### Terraform Validation 🤖\`${{ steps.validate.outcome }}\` | ||
#### Terraform Plan 📖\`${{ steps.plan.outcome }}\` | ||
<details><summary>Show Plan</summary> | ||
\`\`\`\n | ||
${process.env.PLAN} | ||
\`\`\` | ||
</details> | ||
*Pushed by: @${{ github.actor }}, Action: \`${{ github.event_name }}\`*`; | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: output | ||
}) | ||
- name: Terraform Plan Status | ||
if: steps.plan.outcome == 'failure' | ||
run: exit 1 | ||
|
||
- name: Terraform Destroy | ||
if: github.ref == 'refs/heads/destroy-genai-appstack' && github.event_name == 'push' | ||
run: terraform destroy -auto-approve -input=false | ||
env: | ||
TF_VAR_aws_access_key: ${{ secrets.aws_access_key }} | ||
TF_VAR_aws_secret_key: ${{ secrets.aws_secret_key }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 2 additions & 0 deletions
2
workflow-guides/smcn/genai-appconnect-waf/automation-workflow.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file added
BIN
+131 KB
workflow-guides/smcn/genai-inference-at-the-edge/assets/app-deploy.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+293 KB
workflow-guides/smcn/genai-inference-at-the-edge/assets/aws-site-access.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+219 KB
workflow-guides/smcn/genai-inference-at-the-edge/assets/deploy_pipeline.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+217 KB
workflow-guides/smcn/genai-inference-at-the-edge/assets/destroy_pipeline.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+241 KB
workflow-guides/smcn/genai-inference-at-the-edge/assets/kubeconfig.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added
BIN
+190 KB
workflow-guides/smcn/genai-inference-at-the-edge/assets/pods-online.JPG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.