Farmer
Use farmer to deploy your applications on VM Farms.
Installation
Install with pip:
pip install farmer
Configuration
You need to provide Farmer with your VM Farms API token. You can retrieve your API token from the API documentation section of the VM Farms portal.
Run farmer config to set your token for the first time:
farmer config
If you need to change your token for any reason, you can use farmer config set token:
farmer config set token c422b5e2230d617d22759a19a5a5cb65792edebc
You can also set the token using the FARMER_TOKEN environment variable:
FARMER_TOKEN=c422b5e2230d617d22759a19a5a5cb65792edebc farmer apps
Usage
farmer apps
Run farmer apps to list your applications.
farmer apps
If you don't see any applications, we probably need to connect a few wires for you. Contact our support team and we'll sort you out.
farmer deploy
Run farmer deploy to deploy an application:
farmer deploy api api-prod
farmer logdna
Export logs from LogDNA in JSONLines format.
First, generate a service key and configure Farmer:
farmer logdna config
To export logs, run farmer logdna export.
You can filter results by application, host, log level, or a custom search query.
# Export all PostgreSQL logs from the past week.
farmer logdna export --from 'last week' --app postgres
# Export deploy logs from today.
farmer logdna export --app deploy
The -f/--from and -t/--to options support human readable dates like "1 hour ago", "30 minutes ago", "yesterday", etc.
Refer to the dateparser documentation for more information.
Getting help
To get help for a specific command or subcommand, run farmer help:
farmer help deploy
farmer help logdna config
For bugs or feature requests related to Farmer itself, please open a GitHub issue.
For issues related to your applications or deploys, please contact VM Farms support.
Tricks
Add this snippet to your Bash configuration (~/.bashrc or ~/.bash_profile) to enable tab-completion:
eval "$(_FARMER_COMPLETE=source farmer)"
Enjoy!
License
Apache 2.0
Metadata
Release files for farmer 2.4.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| farmer-2.4.3.tar.gz | 12.3 kB | Without provenance | Details for farmer-2.4.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| farmer-2.4.3-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for farmer-2.4.3-py2.py3-none-any.whl |
Total release size: 31.9 kB
Release files / farmer-2.4.3.tar.gz
| Download URL | farmer-2.4.3.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e0bfdeb060a9e6c48e37b3d5562df288d3b072bd03a12d414bbc936852396c4a
|
|
BLAKE2b-256 checksum How to use checksums |
6b9b0ba1da56862b8b75d696b59fb67db4595683665a919d5a950b3baaf9849e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Release files / farmer-2.4.3-py2.py3-none-any.whl
| Download URL | farmer-2.4.3-py2.py3-none-any.whl |
|---|---|
| Size | 19.6 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
b59b2e0e3327204197e3b0820f7903edfbf2c79a38070af4f393c61c6a2fadbe
|
|
BLAKE2b-256 checksum How to use checksums |
1536f4ac79574fa3efa39797933dfa9bb6f89fb145cd2ba075bf897516efafef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3
|
Security for farmer 2.4.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.