Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to use _default #262

Closed
wants to merge 0 commits into from
Closed

Updating to use _default #262

wants to merge 0 commits into from

Conversation

PhillypHenning
Copy link
Contributor

@PhillypHenning PhillypHenning commented Aug 4, 2022

Description

Please include a summary of the change and which issue is fixed. Please also include relevant motivation and context. List any dependencies that are required for this change.

Fixes #
#261
#252

Type of change

Fix

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

How Has This Been Tested?

Locally

Run command using default value

docker run \
-e BITOPS_ENVIRONMENT=AwsTerraform  \
-v /operations-test:/opt/bitops_deployment    \
bitovi/bitops:v2.0.0

Logs

~#~#~#~BITOPS DEPLOYMENT CONFIGURATION~#~#~#~                        
         TEMP_DIR:                [/tmp/tmp723s2nu4]                                      
         DEFAULT_FOLDER_NAME:     [_default]                           
         ENVIRONMENT:             [AwsTerraform]                                           
         TIMEOUT:                 [600]                                       
                                                                              
         BITOPS_DIR:              [/opt/bitops]                                    
         BITOPS_DEPLOYMENT_DIR:   [/opt/bitops_deployment/]                         
         BITOPS_PLUGIN_DIR:       [/opt/bitops/scripts/plugins/]                             
         BITOPS_ENVROOT_DIR:      [/tmp/tmp723s2nu4/AwsTerraform]                            
         BITOPS_OPERATIONS_DIR:   [/tmp/tmp723s2nu4/AwsTerraform]                         
         BITOPS_SCRIPTS_DIR:      [/opt/bitops/scripts]  

Run command using bitops.config.yaml value

docker run \
-e BITOPS_ENVIRONMENT=AwsTerraform  \
-v /operations-test:/opt/bitops_deployment    \
bitovi/bitops:v2.0.0

Logs

~#~#~#~BITOPS DEPLOYMENT CONFIGURATION~#~#~#~                        
         TEMP_DIR:                [/tmp/tmpl2mypne0]                                      
         DEFAULT_FOLDER_NAME:     [bitops-config]                           
         ENVIRONMENT:             [AwsTerraform]                                           
         TIMEOUT:                 [600]                                       
                                                                              
         BITOPS_DIR:              [/opt/bitops]                                    
         BITOPS_DEPLOYMENT_DIR:   [/opt/bitops_deployment/]                         
         BITOPS_PLUGIN_DIR:       [/opt/bitops/scripts/plugins/]                             
         BITOPS_ENVROOT_DIR:      [/tmp/tmpl2mypne0/AwsTerraform]                            
         BITOPS_OPERATIONS_DIR:   [/tmp/tmpl2mypne0/AwsTerraform]                         
         BITOPS_SCRIPTS_DIR:      [/opt/bitops/scripts]   

Run command using ENVIRONMENT VARIABLE

docker run \
-e BITOPS_ENVIRONMENT=AwsTerraform  \
-e BITOPS_DEFAULT_FOLDER="newfolder" \
-v /operations-test:/opt/bitops_deployment    \
bitovi/bitops:v2.0.0

Logs

~#~#~#~BITOPS DEPLOYMENT CONFIGURATION~#~#~#~                        
         TEMP_DIR:                [/tmp/tmpe2x7r89b]                                      
         DEFAULT_FOLDER_NAME:     [newfolder]                           
         ENVIRONMENT:             [AwsTerraform]                                           
         TIMEOUT:                 [600]                                       
                                                                              
         BITOPS_DIR:              [/opt/bitops]                                    
         BITOPS_DEPLOYMENT_DIR:   [/opt/bitops_deployment/]                         
         BITOPS_PLUGIN_DIR:       [/opt/bitops/scripts/plugins/]                             
         BITOPS_ENVROOT_DIR:      [/tmp/tmpe2x7r89b/AwsTerraform]                            
         BITOPS_OPERATIONS_DIR:   [/tmp/tmpe2x7r89b/AwsTerraform]                         
         BITOPS_SCRIPTS_DIR:      [/opt/bitops/scripts] 

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

@PhillypHenning PhillypHenning added the bug 🪲 Something isn't working label Aug 4, 2022
@@ -13,7 +13,7 @@ bitops:
filename: bitops-run # log filename
err: bitops.logs # error logs filename
path: /var/logs/bitops # path to log folder
opsrepo_root_default_dir: _default
default_folder: _default
Copy link
Member

@arm4b arm4b Aug 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we're renaming opsrepo_root_default_dir to default_folder it's considered a breaking change for the users. Do we need to include it in the migration docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

damn you for being right.
But god dang this is a gross looking config option.

I'm can revert this, however the sooner this is done the less pain it is for the users so if we do plan on updating the config option, now rather then later is better

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's fine for the current project adoption & velocity.

Just let's make sure we're adding it to the https://github.com/bitovi/bitops/blob/main/docs/migration/2.0.0-migration.md doc too.

ansible:
plugin: ansible

default_folder: _default
Copy link
Member

@arm4b arm4b Aug 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking at other variables bitops_envroot_dir, bitops_operations_dir, bitops_scripts_dir I suggest to follow that consistent naming and use dir, instead of folder:

Suggested change
default_folder: _default
default_dir: _default

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 I agree

Copy link
Contributor

@mickmcgrath13 mickmcgrath13 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@PhillypHenning Please add the following:

  • notes to the migration guide
  • docs for how to use it and what it does
    • i think there should be a mention of the default dir here. Maybe just link it to here
  • docs should include what env var to set when calling the bitops container to override the default folder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🪲 Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants