-
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.
Merge pull request #1 from simonkowallik/dev
version v2.0
- Loading branch information
Showing
14 changed files
with
397 additions
and
707 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,10 @@ | ||
*.tmpl linguist-language=tcl | ||
|
||
/README.md export-ignore | ||
/tests export-ignore | ||
/templates export-ignore | ||
/examples export-ignore | ||
/_config.yml export-ignore | ||
/.travis.yml export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore |
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,8 @@ | ||
dist: xenial | ||
language: generic | ||
|
||
script: | ||
- ./tests/test_init.sh | ||
- ./tests/test_simple.sh | ||
- ./tests/test_advanced.sh | ||
- ./tests/test_version_attributes.sh |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
BUSER ?= root | ||
BIGIP ?= 192.168.0.245 | ||
|
||
all: | ||
mkiapp > iapp.tmpl | ||
|
||
build: all | ||
|
||
upload: | ||
scp iapp.tmpl $(BUSER)@$(BIGIP):/tmp/ | ||
|
||
verify: upload | ||
ssh $(BUSER)@$(BIGIP) 'tmsh load sys config merge verify file /tmp/iapp.tmpl' | ||
|
||
deploy: verify | ||
ssh $(BUSER)@$(BIGIP) 'tmsh load sys config merge file /tmp/iapp.tmpl' | ||
|
||
install: deploy |
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,30 @@ | ||
# Makefile | ||
This Makefile provides you with an example for mkiapp using GNU make. | ||
|
||
It allows to build the iapp by typing `make` or `make build`. | ||
`make verify` uploads the iapp template to your test BIG-IP using scp and runs `tmsh load /sys config merge verify`. | ||
`make deploy` does the same as `make verify` plus it actually merges it. | ||
*Note:* that this will overwrite any exsting iapp template with the same name! | ||
|
||
To configure your target BIGIP set it in the Makefile or use the environment variable `BIGIP` to overwrite the configured value in the Makefile. Do the same for `BUSER`. | ||
|
||
Example: | ||
```sh | ||
# make | ||
mkiapp > iapp.tmpl | ||
|
||
# make verify | ||
scp iapp.tmpl simon@192.168.0.245:/tmp/ | ||
ssh simon@192.168.0.245 tmsh load sys config merge verify file /tmp/iapp.tmpl | ||
|
||
# BUSER=admin BIGIP=192.0.2.1 make deploy | ||
scp iapp.tmpl admin@192.0.2.1:/tmp/ | ||
ssh admin@192.0.2.1 tmsh load sys config merge verify file /tmp/iapp.tmpl | ||
ssh admin@192.0.2.1 tmsh load sys config merge file /tmp/iapp.tmpl | ||
``` | ||
|
||
# simple | ||
A simple mkiapp demo, see directory for more details. | ||
|
||
# advanced | ||
A more advanced mkiapp demo, see directory for more details. |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
#TMSH-VERSION: <MKIAPP_VAR_TMSH_VERSION> | ||
|
||
cli admin-partitions { | ||
update-partition Common | ||
} | ||
sys application template /Common/<MKIAPP_IAPP_NAME> { | ||
actions { | ||
definition { | ||
html-help { | ||
<MKIAPP_SECTIONFILE_HELP> | ||
} | ||
implementation { | ||
<MKIAPP_SECTIONFILE_IMPLEMENTATION> | ||
} | ||
macro { | ||
<MKIAPP_SECTIONFILE_MACRO> | ||
} | ||
presentation { | ||
<MKIAPP_SECTIONFILE_PRESENTATION> | ||
} | ||
role-acl none | ||
run-as none | ||
} | ||
} | ||
description none | ||
ignore-verification false | ||
requires-bigip-version-max <MKIAPP_VAR_MAXVERSION> | ||
requires-bigip-version-min <MKIAPP_VAR_MINVERSION> | ||
requires-modules { <MKIAPP_VAR_REQUIRED_MODULES> } | ||
signing-key none | ||
tmpl-checksum none | ||
tmpl-signature none | ||
} |
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,28 @@ | ||
#!/usr/bin/env bash | ||
set -ev | ||
|
||
# prepare for tests | ||
export PATH="$PATH:$(pwd)" | ||
export BASEDIR=$(pwd) | ||
cd ./examples/advanced | ||
|
||
# init mkiapp in current directory | ||
mkiapp init >/dev/null || exit 1 | ||
|
||
# update iapp name | ||
mkiapp config MKIAPP_IAPP_NAME adv_test || exit 1 | ||
grep 'MKIAPP_IAPP_NAME.*adv_test.*' .mkiapp >/dev/null || exit 1 | ||
|
||
# update section files | ||
mkiapp config MKIAPP_SECTIONFILE_IMPLEMENTATION impl.tcl || exit 1 | ||
mkiapp config MKIAPP_SECTIONFILE_MACRO irule_macro.tcl || exit 1 | ||
|
||
# add MKIAPP_FILE for HTML response | ||
mkiapp config MKIAPP_FILE_HTMLRESPONSE ./htmlresponse.html || exit 1 | ||
|
||
# export current version & generate iApp | ||
export MKIAPP_ENV_PRESENTATION_VERSION=v01 | ||
mkiapp -t $BASEDIR/tests/template.tmpl > iapp.tmpl || exit 1 | ||
|
||
# check if iApp differs from expected result | ||
diff $BASEDIR/tests/test_advanced.tmpl iapp.tmpl || exit 1 |
Oops, something went wrong.