DeployHubProject / DeployHub-Pro

DeployHub Pro Pipeline Status Project
https://www.openmakesoftware.com/application-release-automation-for-continuous-delivery/
Other
11 stars 4 forks source link

docker container item not deploying #267

Closed piyush94 closed 4 years ago

piyush94 commented 5 years ago

image

image

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 And also there should be a option to specify K8 namespace for the helm chart.

CC: @svisagan83

sbtaylor15 commented 5 years ago

working when attrs are assigned at component level

sbtaylor15 commented 5 years ago

Add Release Name as variable for helm upgrade parameters.

sbtaylor15 commented 5 years ago

Made helm init --client only change Added namespace flag on helm install Added namespace on docker component item

sbtaylor15 commented 5 years ago

Release Name is pass as a variable in the Action. ${component.name} is currently being used. Change it as needed.

image

sbtaylor15 commented 5 years ago

@piyush94 here is the update WriteEnv2File and WriteEnv2Toml procedures. Please import these into GLOBAL domain. The import will overwrite the existing procedures.

WriteEnvProc.zip

The dh2helm.py will look for the creds['helmrepo'] variable to pull the credentials for the helm repo login.

Also, the helm deployment will now run on the remote server or localhost (the DH docker container).

Namespace is now part of the Docker Component Item.

Both dh2ansible.py and dh2helm.py were updated to handle using ssh key file if the credential is setup as a Private Key type.

We have regression tested the IIS deployment using the WinShare and IIS playbook. And tested helm deployments locally and remote.

Please pull the latest image.

CC: @svisagan83

sbtaylor15 commented 5 years ago

Add helmopts to pass in additional cmd line parameters

piyush94 commented 5 years ago

@sbtaylor15 Little urgent issue, the writeenvtoml is not writing Chart attribute from docker container item and as a result dh2helm is not picking up the Chart attribute,

image

I tried by adding Chart attribute in application and it worked.

image

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 Also releasename should only be the component name, but it's combining component name, version and chartname for releasename.

image

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 creds["helmrepo"] is not getting picked up. image

image

CC: @svisagan83

sbtaylor15 commented 5 years ago

@piyush94 can you send a screen shot of the docker component item and of the attributes on the component. I need to see the values listed there, specifically the chart name. I want to make sure the chart name is getting saved to the database for the component item. Also, the chart at the component attribute maybe being overridden by the docker component item.

piyush94 commented 5 years ago

@sbtaylor15 As per my understanding Chart name automatically maps to docker container item even if add it as an attribute? image

image

image

image

I have also imported the new WriteEnv2Toml procedure.

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 correct attributes in Jenkinsfile screenshot: image

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 chartname issue solved by passing "chart" instead of "Chart". image

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 releasename fix: image

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 creds issue fix in WriteEnv2Toml: old: image

new: image

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 kindly disable cmd output, it's exposing user password in deployment logs. image

CC: @svisagan83

piyush94 commented 5 years ago

@sbtaylor15 here also: image

CC: @svisagan83

sbtaylor15 commented 4 years ago

@piyush94 - please pull latest image that fixes the password from being displayed

CC: @svisagan83

piyush94 commented 4 years ago

@sbtaylor15 Hi, any update on helmopts to pass additional arguments. This is required because we have multiple deployment clusters and we need to set --kubeconfig flag with relevant config file while deploying to a particular cluster. Or let us know if there is a better way to handle deployments to different clusters from deployhub. Thanks.

CC: @svisagan83

sbtaylor15 commented 4 years ago

@piyush94 please pull the latest image. set helmopts attribute to any string and it will be added to the helm upgrade command line after the namespace parameter.

CC: @svisagan83

piyush94 commented 4 years ago

@sbtaylor15 Hi Steve, i am trying to override the chartnamespace at environment level. but i am getting the below error. image

image

CC: @svisagan83

sbtaylor15 commented 4 years ago

@piyush94 please pull the latest image. Changed the dh2helm.py to enable overriding of the variables.

Override order is as follows:

For example, variable 'foo' at the component level will override 'foo' defined at the environment level.

FYI, these changes have been made to the beta branch as well.

CC: @svisagan83

piyush94 commented 4 years ago

@sbtaylor15 our use case was to override the variable at component level with variable at environment level. The thing is we wouldn't want to change namespace for each component instead override it with what is available at environment level. Could you please suggest a better solution/workaround for this use case? Thanks,

CC: @svisagan83

sbtaylor15 commented 4 years ago

@piyush94 if you just want to reverse precedence we can do that in the WriteEnv2Toml procedure. But if you want to have an override at any point in the precedence hierarchy we will need to come up with another solution. Let me know which way you want to go.

CC: @svisagan83

piyush94 commented 4 years ago

@sbtaylor15 precedence order is fine for now. One issue happening is we are not able to leave chartnamepspace empty at component level. We have defined chartnamespace at environment level but it's taking value "0" instead taking from environment.

Log: image

Component Item: image

CC: @svisagan83

piyush94 commented 4 years ago

@sbtaylor15 chartnamespace was provided at application level but it still got set to "0". image

CC: @svisagan83

sbtaylor15 commented 4 years ago

@piyush94 we fixed the code to handle chartnamespace being blank. Please pull the latest image.

CC: @svisagan83

sbtaylor15 commented 4 years ago

@piyush94 - Can we close this issue?

CC: @svisagan83