-
Notifications
You must be signed in to change notification settings - Fork 807
Description
Monkey Island needs to write runtime artifacts to a writable location and assume that the source code directory is read-only (#1141). Currently, the "data_dir"
configuration option is provided in server_config.json
, but is effectively duplicated in the logger config. Since the server_config.json
contains data for populating the EnvironmentConfig
object, this effectively entangles the logger config with the environment config.
-
Parse
server_config.json
config inmonkey_island.py
. (0d) - @shreyamalviya- Remove
island_logger_config.json
- Remove
--logger-config
command-line argument - Add
"log_level"
option toserver_config.json
. - Replace
json_setup_logging()
with a new function that configures the logger.- The function accepts 2 parameters:
- The logging level
- The data directory
- The function configures the logger using settings that are identical to what
was inisland_logger_config.json
except it uses the logging level it was given
and the log is written to"${data_dir}/monkey_island.log"
.
- The function accepts 2 parameters:
monkey_island.py
parses the configuration file and passes the appropriate configuration values to the new logger configuration function.
- Remove
-
Reoganize the default
server_config.json
to have an"environment"
section comprising the old environment config. (0d) @mssalvatore
Example:
{
"log_level": "debug",
"environment": {
"data_dir": "$HOME/.monkey_island",
"server_config": "password",
"deployment": "development",
"user": "my_user",
"password_hash": "DEADBEEF"
}
}
-
monkey_island.py
passes the server config file path tomain.py
which passes it to theEnvironmentConfig
constructor. -
Modify
EnvironmentConfig.save_to_file()
so that only the"environment"
config section inserver_config.json
is updated. -
Move
"data_dir"
to the top level of the configuration. (00d) @mssalvatore
{
"log_level": "debug",
"data_dir": "$HOME/.monkey_island",
"environment": {
"server_config": "password",
"deployment": "development",
"user": "my_user",
"password_hash": "DEADBEEF"
}
}
- Replace all current references to
data_dir
ordata_dir_abs_path
with calls to the newget_data_dir()
function. - Update the documentation (0d) - @shreyamalviya
- Update the documentation for resetting the password
- Add instructions for changing the log level
- Add a description for
"data_dir"
- Update the docker build to use the new
server_config.json
format. (0d) @mssalvatore - Update the AppImage build to use the new
server_config.json
format.(0d) @mssalvatore - Update the MSI build to use the new
server_config.json
format. (0.25d) (Blocked by Monkey build machine being offline due to office moving)