Skip to content
Snippets Groups Projects
Commit 62db739c authored by Hahn Axel (hahn)'s avatar Hahn Axel (hahn)
Browse files

update docs

parent 66f532b8
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,12 @@
```text
./amcli -h
IML Appmonitor as CLI client 0.5
_____ _____ __ _____ _ _
| | | | ___ ___ ___| |___ ___|_| |_ ___ ___
|- -| | | | |__ | .'| . | . | | | | . | | | _| . | _|
|_____|_|_|_|_____| |__,| _| _|_|_|_|___|_|_|_|_| |___|_|
|_| |_|
CLI client v0.7
This client performs appmonitor checks and puts the results as JSON to stdout.
It contains all checks that are available in the PHP appmonitor client.
......@@ -24,12 +29,12 @@ You find example snippets in the source code of this project in tests/config/.
...............................................................................
✨ SYNTAX:
✨ SYNTAX:
amcli [OPTIONS] --ini=<INI-FILE>
🔷 OPTIONS:
🔷 OPTIONS:
-h, --help Print this help and exit
......@@ -42,7 +47,7 @@ You find example snippets in the source code of this project in tests/config/.
-V, --version Show version and exit
👉 EXAMPLES:
👉 EXAMPLES:
amcli -i=my.ini
amcli --ini=my.ini
......
......@@ -51,7 +51,36 @@ You get this initial structure:
### Installer
Run the `./installer.php` to download apmonitor source and spc. It prepares the micro build and creates a merged php file of all appmonitor client checks.
Run the `./installer.php` to download apmonitor source and spc. It prepares the micro build and creates a merged php file of all appmonitor client checks. This script has command line parameter support.
```txt
./installer.php -h
CLI client
DEVELOPMENT ENVIRONMENT
I N S T A L L E R * U P D A T E R
...............................................................................
- Get appmonitor sources or updates it
- Get spc binary
- Installations with spc doctor
- Download PHP and libs with spc
- Build Micro sfx with spc
...............................................................................
✨ SYNTAX:
./installer.php [OPTIONS]
🔷 OPTIONS:
-h, --help Show this help
-r, --reset Reset; delete created folders of installer and build
```
The newly created files and dirs are:
......@@ -69,15 +98,90 @@ The newly created files and dirs are:
:
```
### Build
## Build
To build the amcli binary start `./build.php`. This script has command line parameter support.
```txt
./build.php -h
CLI client
DEVELOPMENT ENVIRONMENT
B U I L D E R
...............................................................................
- Merge PHP sources to a single file
- Compile binary
- Test binary
- Coy to architecture specific binary
- Create readme with buildinfos
...............................................................................
✨ SYNTAX:
To build the amcli binary start `./build.php`. First it merges src/amcli.php and src/include_checks.php to src/amcli.php**.tmp** which is used for the build command of spc.
./build.php [OPTIONS]
🔷 OPTIONS:
-h, --help Show this help
-f, --force Force rebuild on unchanged sources
-t, --test Run full test suite: ./tests/00_start.php
without '-t': run a single check only.
```
First it merges src/amcli.php and src/include_checks.php to src/amcli.php**.tmp** which is used for the build command of spc.
Output directory is `built_packages`.
After building the binary it executes it (with -V to show the version). If it is OK then it creates a copy with platform and architecture suffix.
### Repeat?
## Test
Start the script `./tests/00_start.php` to test all included checks and ini styles.
This script has command line parameter support.
```txt
./tests/00_start.php -h
This ist the test suite for amcli calls.
It executes all scripts in this directory. They perform checks for metadata,
help, all checks and ini features.
✨ SYNTAX:
00_start.php [-b]
🔷 OPTIONS:
-h, --help Show this help
-b, --bin [=<FILE>] Set amcli binary. If a FILE is given then use that one.
Default is the php script
/home/axel/data/opensource/php-class/amc-cli/tests/../src/amcli.php
Default of -b without file is
/home/axel/data/opensource/php-class/amc-cli/tests/../built_packages/amcli
-l, --list list filenames of tests
👉 EXAMPLES:
00_start.php Run all tests with php sccript src/amcli.php
00_start.php --bin Run all tests with compiled binary built_packages/amcli
00_start.php --bin=<FILE>
Run all tests with given binary
```
By default the testsuite is executed with the php script `./src/amcli.php`.
To test a compiled binary
This test will executed too, if you use the build script with `-t`.
## Repeat?
You need to re-run install.php + build.php if
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment