Foundation¶
This is the main doc for Foundation's command line, known as foundation. It's a tool delivered with Foundation that allows you to monitor and manage your apps.
Core Concepts¶
Before you get into the command line, you need to get familiar with some core concepts.
Foundation is built around 3 main concepts:
-
Image: contains all the instructions needed to run the app, that is all the compiled code in a freeze state.
-
Instance: is a running app created based on an image.
-
Service: is responsible for managing the life cycle of an instance.
Basic Commands¶
Help¶
NAME:
foundation - Synchro Foundation Client
USAGE:
foundation [global options] command [command options] [arguments...]
VERSION:
21.09.23
DESCRIPTION:
Foundation is a platform for Synchro applications. You can learn more at: https://foundation.synchro.com.br
COMMANDS:
application, app Manage apps
clean Clear unused (old) data from foundation directories
completion Return scripts for shell autocompletion configuration
config, setup Setup Foundation config (requires root)
info, check Display system-wide information
login Starts a new Foundation session
logout Closes current Foundation session
module Manage Foundation's modules (login required)
package Create a app-module-version.module file for use in Foundation
start, up Starts Foundation
status Health check report
stop, down Stops Foundation
tenant Manage Foundation's tenants (login required)
user Manages user access to foundation services (requires root)
version Print client version
web, www (Experimental) Starts a web server on provided port (default 8082) with a interactive web interface, to configure foundation
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--help, -h show help (default: false)
--version, -v print the version (default: false)
start¶
Boots up Foundation with services.
INFO[0000] Starting foundation 23.08.03
INFO[0000] [Foundation Core] Starting services
INFO[0010] [Foundation Module] Proxy service created
INFO[0011] [Foundation Module] Storage service created
INFO[0013] [Foundation Module] Supervisor service created
INFO[0013] [Foundation Core] Foundation Core Components starting. Please wait... (1)...
INFO[0045] [Foundation Core] Foundation Core Components starting. Please wait... (2)...
INFO[0109] [Foundation Core] Foundation Core Components starting. Please wait... (3)...
INFO[0109] [Foundation Core] Started
INFO[0109] [All modules] Starting
INFO[0110] Stop command sent locally for foundation/engine.
INFO[0111] Starting foundation/engine:23.08.03...
...
config¶
Setup foundation config (requires root).
For more information, see configuration.
print¶
Print Setup foundation config.
login¶
Create a session for commands that requires authentication. The login is only valid to current user. If you do a login with sudo it's not valid for non-root users and vice-versa.
Do login with your keycloak user.
INFO[0000] Foundation URL: http://0.0.0.0:80
QUESTION: Login: username
QUESTION: Password:
INFO[0004] Login succeeded
Info¶
INFO[0000] Starting basic requirements check...
WARN[0000] Linux distro: [ubuntu 20.04] not tested
INFO[0000] [5.4.0-8] Kernel: OK
INFO[0000] Available Memory: [6950M] OK
INFO[0000] ip_forward OK
Status¶
List all Foundation's services statuses.
INFO[0002] Current Session: http://0.0.0.0:80
INFO[0002] proxy OK 0.0.0.0:80
INFO[0002] supervisor OK
INFO[0002] storage OK
INFO[0002] engine OK
INFO[0002] postgres OK
INFO[0002] keycloak OK
INFO[0002] authlayer OK
INFO[0002] view OK
INFO[0002] certificates OK
INFO[0002] logs OK
INFO[0002] licenses OK
INFO[0003] monitor OK
autofix¶
Stop previous modules and start the modules from core version.
stop¶
Turns off Foundation system gracefully.
Modules commands¶
module add¶
Add a foundation module.
Adding other foundation modules
Adding other modules consists of doing the same steps mentioned above. Just doing now for the chosen new module.
module start¶
Start a module.
module status¶
List foundation modules statuses.
module stop¶
Start a module.
module remove¶
Remove a module.