From 2793ab34d244443963b9ad23e7fcefad6cb1ddaa Mon Sep 17 00:00:00 2001 From: Steven Hardy Date: Thu, 1 Oct 2015 10:26:16 +0100 Subject: Move RHEL (un)registration to NodeExtraConfig Currently, we have a problem because the unregistration happens in the "post deploy" phase, which works fine when the top-level stack is being deleted, but not when the ResourceGroup of servers is being scaled down, because then the normal "post deploy" update ordering is respected and we try to unregister after the corresponding server has been deleted. So, instead, register/unregister each node inside the unit of scale, e.g the role template being scaled down, which is possible via the new NodesExtraConfig interface, which means unregistration will take place at the right time both on stack delete and on scale-down. Change-Id: I8f117a49fd128f268659525dd03ad46ba3daa1bc --- .../rhel-registration/rhel-registration.yaml | 113 --------------------- 1 file changed, 113 deletions(-) delete mode 100644 extraconfig/post_deploy/rhel-registration/rhel-registration.yaml (limited to 'extraconfig/post_deploy/rhel-registration/rhel-registration.yaml') diff --git a/extraconfig/post_deploy/rhel-registration/rhel-registration.yaml b/extraconfig/post_deploy/rhel-registration/rhel-registration.yaml deleted file mode 100644 index bf6c88cd..00000000 --- a/extraconfig/post_deploy/rhel-registration/rhel-registration.yaml +++ /dev/null @@ -1,113 +0,0 @@ -heat_template_version: 2014-10-16 - -description: > - RHEL Registration and unregistration software deployments. - -# Note extra parameters can be defined, then passed data via the -# environment parameter_defaults, without modifying the parent template -parameters: - servers: - type: json - # To be defined via a local or global environment in parameter_defaults - rhel_reg_activation_key: - type: string - rhel_reg_auto_attach: - type: string - rhel_reg_base_url: - type: string - rhel_reg_environment: - type: string - rhel_reg_force: - type: string - rhel_reg_machine_name: - type: string - rhel_reg_org: - type: string - rhel_reg_password: - type: string - rhel_reg_pool_id: - type: string - rhel_reg_release: - type: string - rhel_reg_repos: - type: string - rhel_reg_sat_url: - type: string - rhel_reg_server_url: - type: string - rhel_reg_service_level: - type: string - rhel_reg_user: - type: string - rhel_reg_type: - type: string - rhel_reg_method: - type: string - -resources: - - RHELRegistration: - type: OS::Heat::SoftwareConfig - properties: - group: script - inputs: - - name: REG_ACTIVATION_KEY - - name: REG_AUTO_ATTACH - - name: REG_BASE_URL - - name: REG_ENVIRONMENT - - name: REG_FORCE - - name: REG_MACHINE_NAME - - name: REG_ORG - - name: REG_PASSWORD - - name: REG_POOL_ID - - name: REG_RELEASE - - name: REG_REPOS - - name: REG_SAT_URL - - name: REG_SERVER_URL - - name: REG_SERVICE_LEVEL - - name: REG_USER - - name: REG_TYPE - - name: REG_METHOD - config: {get_file: scripts/rhel-registration} - - RHELRegistrationDeployment: - type: OS::Heat::SoftwareDeployments - properties: - servers: {get_param: servers} - config: {get_resource: RHELRegistration} - actions: ['CREATE'] # Only do this on CREATE - input_values: - REG_ACTIVATION_KEY: {get_param: rhel_reg_activation_key} - REG_AUTO_ATTACH: {get_param: rhel_reg_auto_attach} - REG_BASE_URL: {get_param: rhel_reg_base_url} - REG_ENVIRONMENT: {get_param: rhel_reg_environment} - REG_FORCE: {get_param: rhel_reg_force} - REG_MACHINE_NAME: {get_param: rhel_reg_machine_name} - REG_ORG: {get_param: rhel_reg_org} - REG_PASSWORD: {get_param: rhel_reg_password} - REG_POOL_ID: {get_param: rhel_reg_pool_id} - REG_RELEASE: {get_param: rhel_reg_release} - REG_REPOS: {get_param: rhel_reg_repos} - REG_SAT_URL: {get_param: rhel_reg_sat_url} - REG_SERVER_URL: {get_param: rhel_reg_server_url} - REG_SERVICE_LEVEL: {get_param: rhel_reg_service_level} - REG_USER: {get_param: rhel_reg_user} - REG_TYPE: {get_param: rhel_reg_type} - REG_METHOD: {get_param: rhel_reg_method} - - RHELUnregistration: - type: OS::Heat::SoftwareConfig - properties: - group: script - config: {get_file: scripts/rhel-unregistration} - inputs: - - name: REG_METHOD - - RHELUnregistrationDeployment: - type: OS::Heat::SoftwareDeployments - properties: - servers: {get_param: servers} - config: {get_resource: RHELUnregistration} - actions: ['DELETE'] # Only do this on DELETE - input_values: - REG_METHOD: {get_param: rhel_reg_method} -- cgit 1.2.3-korg