Guest User

OS-Helm External DNS

a guest
Sep 21st, 2017
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 15.42 KB | None | 0 0
  1. ###############################################
  2. # Create A Records (or do an /etc/hosts)
  3. ###############################################
  4.  
  5. 1.2.3.4     horizon.os.foo.org
  6. 1.2.3.4     neutron.os.foo.org
  7. 1.2.3.4     keystone.os.foo.org
  8. 1.2.3.4     nova.os.foo.org
  9. 1.2.3.4     metadata.os.foo.org
  10. 1.2.3.4     glance-reg.os.foo.org
  11. 1.2.3.4     glance.os.foo.org
  12.  
  13. ###############################################
  14. # Upgrade Horizon
  15. ###############################################
  16. export FQDN=.os.foo.org
  17.  
  18. helm upgrade horizon local/horizon --namespace=openstack \
  19.   --set endpoints.dashboard.host_fqdn_override.default=horizon.$FQDN
  20. ###############################################
  21. # Horizon works.. can see instances/hypervisor, etc..
  22. ###############################################
  23.  
  24. ###############################################
  25. # Try upgrading Keystone... Whoa. But try a second time, no problem..
  26. ###############################################
  27.  
  28. :~/openstack-helm$ helm upgrade keystone local/keystone   --set
  29. endpoints.identity.host_fqdn_override.default=keystone.$FQDN
  30.  
  31. Error: UPGRADE FAILED: Job.batch "keystone-db-sync" is invalid: spec.template: Invalid value: api.PodTemplateSpec{ObjectMeta:v1.ObjectMeta{Name:"", GenerateName:"", Namespace:"", SelfLink:"", UID:"", ResourceVersion:"", Generation:0, CreationTimestamp:v1.Time{Time:time.Time{sec:0, nsec:0, loc:(*time.Location)(nil)}}, DeletionTimestamp:(*v1.Time)(nil), DeletionGracePeriodSeconds:(*int64)(nil), Labels:map[string]string{"controller-uid":"e958265e-9f0e-11e7-a6fe-005056a35a66", "application":"keystone", "component":"db-sync", "release_group":"keystone", "job-name":"keystone-db-sync"}, Annotations:map[string]string{}, OwnerReferences:[]v1.OwnerReference(nil), Finalizers:[]string(nil), ClusterName:""}, Spec:api.PodSpec{Volumes:[]api.Volume{api.Volume{Name:"etckeystone", VolumeSource:api.VolumeSource{HostPath:(*api.HostPathVolumeSource)(nil), EmptyDir:(*api.EmptyDirVolumeSource)(0xc429dc6980), GCEPersistentDisk:(*api.GCEPersistentDiskVolumeSource)(nil), AWSElasticBlockStore:(*api.AWSElasticBlockStoreVolumeSource)(nil), GitRepo:(*api.GitRepoVolumeSource)(nil), Secret:(*api.SecretVolumeSource)(nil), NFS:(*api.NFSVolumeSource)(nil), ISCSI:(*api.ISCSIVolumeSource)(nil), Glusterfs:(*api.GlusterfsVolumeSource)(nil), PersistentVolumeClaim:(*api.PersistentVolumeClaimVolumeSource)(nil), RBD:(*api.RBDVolumeSource)(nil), Quobyte:(*api.QuobyteVolumeSource)(nil), FlexVolume:(*api.FlexVolumeSource)(nil), Cinder:(*api.CinderVolumeSource)(nil), CephFS:(*api.CephFSVolumeSource)(nil), Flocker:(*api.FlockerVolumeSource)(nil), DownwardAPI:(*api.DownwardAPIVolumeSource)(nil), FC:(*api.FCVolumeSource)(nil), AzureFile:(*api.AzureFileVolumeSource)(nil), ConfigMap:(*api.ConfigMapVolumeSource)(nil), VsphereVolume:(*api.VsphereVirtualDiskVolumeSource)(nil), AzureDisk:(*api.AzureDiskVolumeSource)(nil), PhotonPersistentDisk:(*api.PhotonPersistentDiskVolumeSource)(nil), Projected:(*api.ProjectedVolumeSource)(nil), PortworxVolume:(*api.PortworxVolumeSource)(nil), ScaleIO:(*api.ScaleIOVolumeSource)(nil)}}, api.Volume{Name:"keystone-etc", VolumeSource:api.VolumeSource{HostPath:(*api.HostPathVolumeSource)(nil), EmptyDir:(*api.EmptyDirVolumeSource)(nil), GCEPersistentDisk:(*api.GCEPersistentDiskVolumeSource)(nil), AWSElasticBlockStore:(*api.AWSElasticBlockStoreVolumeSource)(nil), GitRepo:(*api.GitRepoVolumeSource)(nil), Secret:(*api.SecretVolumeSource)(nil), NFS:(*api.NFSVolumeSource)(nil), ISCSI:(*api.ISCSIVolumeSource)(nil), Glusterfs:(*api.GlusterfsVolumeSource)(nil), PersistentVolumeClaim:(*api.PersistentVolumeClaimVolumeSource)(nil), RBD:(*api.RBDVolumeSource)(nil), Quobyte:(*api.QuobyteVolumeSource)(nil), FlexVolume:(*api.FlexVolumeSource)(nil), Cinder:(*api.CinderVolumeSource)(nil), CephFS:(*api.CephFSVolumeSource)(nil), Flocker:(*api.FlockerVolumeSource)(nil), DownwardAPI:(*api.DownwardAPIVolumeSource)(nil), FC:(*api.FCVolumeSource)(nil), AzureFile:(*api.AzureFileVolumeSource)(nil), ConfigMap:(*api.ConfigMapVolumeSource)(0xc42c682c80), VsphereVolume:(*api.VsphereVirtualDiskVolumeSource)(nil), AzureDisk:(*api.AzureDiskVolumeSource)(nil), PhotonPersistentDisk:(*api.PhotonPersistentDiskVolumeSource)(nil), Projected:(*api.ProjectedVolumeSource)(nil), PortworxVolume:(*api.PortworxVolumeSource)(nil), ScaleIO:(*api.ScaleIOVolumeSource)(nil)}}, api.Volume{Name:"keystone-bin", VolumeSource:api.VolumeSource{HostPath:(*api.HostPathVolumeSource)(nil), EmptyDir:(*api.EmptyDirVolumeSource)(nil), GCEPersistentDisk:(*api.GCEPersistentDiskVolumeSource)(nil), AWSElasticBlockStore:(*api.AWSElasticBlockStoreVolumeSource)(nil), GitRepo:(*api.GitRepoVolumeSource)(nil), Secret:(*api.SecretVolumeSource)(nil), NFS:(*api.NFSVolumeSource)(nil), ISCSI:(*api.ISCSIVolumeSource)(nil), Glusterfs:(*api.GlusterfsVolumeSource)(nil), PersistentVolumeClaim:(*api.PersistentVolumeClaimVolumeSource)(nil), RBD:(*api.RBDVolumeSource)(nil), Quobyte:(*api.QuobyteVolumeSource)(nil), FlexVolume:(*api.FlexVolumeSource)(nil), Cinder:(*api.CinderVolumeSource)(nil), CephFS:(*api.CephFSVolumeSource)(nil), Flocker:(*api.FlockerVolumeSource)(nil), DownwardAPI:(*api.DownwardAPIVolumeSource)(nil), FC:(*api.FCVolumeSource)(nil), AzureFile:(*api.AzureFileVolumeSource)(nil), ConfigMap:(*api.ConfigMapVolumeSource)(0xc42c682d40), VsphereVolume:(*api.VsphereVirtualDiskVolumeSource)(nil), AzureDisk:(*api.AzureDiskVolumeSource)(nil), PhotonPersistentDisk:(*api.PhotonPersistentDiskVolumeSource)(nil), Projected:(*api.ProjectedVolumeSource)(nil), PortworxVolume:(*api.PortworxVolumeSource)(nil), ScaleIO:(*api.ScaleIOVolumeSource)(nil)}}, api.Volume{Name:"keystone-fernet-keys", VolumeSource:api.VolumeSource{HostPath:(*api.HostPathVolumeSource)(nil), EmptyDir:(*api.EmptyDirVolumeSource)(nil), GCEPersistentDisk:(*api.GCEPersistentDiskVolumeSource)(nil), AWSElasticBlockStore:(*api.AWSElasticBlockStoreVolumeSource)(nil), GitRepo:(*api.GitRepoVolumeSource)(nil), Secret:(*api.SecretVolumeSource)(0xc42c682d80), NFS:(*api.NFSVolumeSource)(nil), ISCSI:(*api.ISCSIVolumeSource)(nil), Glusterfs:(*api.GlusterfsVolumeSource)(nil), PersistentVolumeClaim:(*api.PersistentVolumeClaimVolumeSource)(nil), RBD:(*api.RBDVolumeSource)(nil), Quobyte:(*api.QuobyteVolumeSource)(nil), FlexVolume:(*api.FlexVolumeSource)(nil), Cinder:(*api.CinderVolumeSource)(nil), CephFS:(*api.CephFSVolumeSource)(nil), Flocker:(*api.FlockerVolumeSource)(nil), DownwardAPI:(*api.DownwardAPIVolumeSource)(nil), FC:(*api.FCVolumeSource)(nil), AzureFile:(*api.AzureFileVolumeSource)(nil), ConfigMap:(*api.ConfigMapVolumeSource)(nil), VsphereVolume:(*api.VsphereVirtualDiskVolumeSource)(nil), AzureDisk:(*api.AzureDiskVolumeSource)(nil), PhotonPersistentDisk:(*api.PhotonPersistentDiskVolumeSource)(nil), Projected:(*api.ProjectedVolumeSource)(nil), PortworxVolume:(*api.PortworxVolumeSource)(nil), ScaleIO:(*api.ScaleIOVolumeSource)(nil)}}}, InitContainers:[]api.Container{api.Container{Name:"init", Image:"docker.io/kolla/ubuntu-source-kubernetes-entrypoint:4.0.0", Command:[]string{"kubernetes-entrypoint"}, Args:[]string(nil), WorkingDir:"", Ports:[]api.ContainerPort(nil), EnvFrom:[]api.EnvFromSource(nil), Env:[]api.EnvVar{api.EnvVar{Name:"POD_NAME", Value:"", ValueFrom:(*api.EnvVarSource)(0xc425790c60)}, api.EnvVar{Name:"NAMESPACE", Value:"", ValueFrom:(*api.EnvVarSource)(0xc425790ca0)}, api.EnvVar{Name:"INTERFACE_NAME", Value:"eth0", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"DEPENDENCY_SERVICE", Value:"mariadb", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"DEPENDENCY_JOBS", Value:"keystone-db-init,keystone-credential-setup,keystone-fernet-setup", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"DEPENDENCY_DAEMONSET", Value:"", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"DEPENDENCY_CONTAINER", Value:"", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"COMMAND", Value:"echo done", ValueFrom:(*api.EnvVarSource)(nil)}}, Resources:api.ResourceRequirements{Limits:api.ResourceList(nil), Requests:api.ResourceList(nil)}, VolumeMounts:[]api.VolumeMount(nil), LivenessProbe:(*api.Probe)(nil), ReadinessProbe:(*api.Probe)(nil), Lifecycle:(*api.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*api.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, Containers:[]api.Container{api.Container{Name:"keystone-db-sync", Image:"docker.io/kolla/ubuntu-source-keystone:3.0.3", Command:[]string{"/tmp/db-sync.sh"}, Args:[]string(nil), WorkingDir:"", Ports:[]api.ContainerPort(nil), EnvFrom:[]api.EnvFromSource(nil), Env:[]api.EnvVar{api.EnvVar{Name:"OS_BOOTSTRAP_ADMIN_URL", Value:"http://keystone.os.spoc.linux:35357/v3", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"OS_BOOTSTRAP_INTERNAL_URL", Value:"http://keystone.os.spoc.linux:80/v3", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"OS_BOOTSTRAP_PUBLIC_URL", Value:"http://keystone.os.spoc.linux:80/v3", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"OS_IDENTITY_API_VERSION", Value:"3", ValueFrom:(*api.EnvVarSource)(nil)}, api.EnvVar{Name:"OS_AUTH_URL", Value:"", ValueFrom:(*api.EnvVarSource)(0xc425790900)}, api.EnvVar{Name:"OS_REGION_NAME", Value:"", ValueFrom:(*api.EnvVarSource)(0xc425790920)}, api.EnvVar{Name:"OS_PROJECT_DOMAIN_NAME", Value:"", ValueFrom:(*api.EnvVarSource)(0xc425790940)}, api.EnvVar{Name:"OS_PROJECT_NAME", Value:"", ValueFrom:(*api.EnvVarSource)(0xc425790960)}, api.EnvVar{Name:"OS_USER_DOMAIN_NAME", Value:"", ValueFrom:(*api.EnvVarSource)(0xc425790980)}, api.EnvVar{Name:"OS_USERNAME", Value:"", ValueFrom:(*api.EnvVarSource)(0xc4257909a0)}, api.EnvVar{Name:"OS_PASSWORD", Value:"", ValueFrom:(*api.EnvVarSource)(0xc4257909c0)}}, Resources:api.ResourceRequirements{Limits:api.ResourceList(nil), Requests:api.ResourceList(nil)}, VolumeMounts:[]api.VolumeMount{api.VolumeMount{Name:"etckeystone", ReadOnly:false, MountPath:"/etc/keystone", SubPath:""}, api.VolumeMount{Name:"keystone-etc", ReadOnly:true, MountPath:"/etc/keystone/keystone.conf", SubPath:"keystone.conf"}, api.VolumeMount{Name:"keystone-bin", ReadOnly:true, MountPath:"/tmp/db-sync.sh", SubPath:"db-sync.sh"}, api.VolumeMount{Name:"keystone-fernet-keys", ReadOnly:false, MountPath:"/etc/keystone/fernet-keys/", SubPath:""}}, LivenessProbe:(*api.Probe)(nil), ReadinessProbe:(*api.Probe)(nil), Lifecycle:(*api.Lifecycle)(nil), TerminationMessagePath:"/dev/termination-log", TerminationMessagePolicy:"File", ImagePullPolicy:"IfNotPresent", SecurityContext:(*api.SecurityContext)(nil), Stdin:false, StdinOnce:false, TTY:false}}, RestartPolicy:"OnFailure", TerminationGracePeriodSeconds:(*int64)(0xc429dc6cd8), ActiveDeadlineSeconds:(*int64)(nil), DNSPolicy:"ClusterFirst", NodeSelector:map[string]string{"openstack-control-plane":"enabled"}, ServiceAccountName:"", AutomountServiceAccountToken:(*bool)(nil), NodeName:"", SecurityContext:(*api.PodSecurityContext)(0xc42c682f80), ImagePullSecrets:[]api.LocalObjectReference(nil), Hostname:"", Subdomain:"", Affinity:(*api.Affinity)(nil), SchedulerName:"default-scheduler", Tolerations:[]api.Toleration(nil)}}: field is immutable
  32.  
  33. ###############################################
  34. # Second try, keystone
  35. ###############################################
  36.  
  37. :~/openstack-helm$ helm upgrade keystone local/keystone   --set endpoints.identity.host_fqdn_override.default=keystone.$FQDN
  38.  
  39. Release "keystone" has been upgraded. Happy Helming!
  40. LAST DEPLOYED: Thu Sep 21 21:30:41 2017
  41. NAMESPACE: openstack
  42. STATUS: DEPLOYED
  43.  
  44. RESOURCES:
  45. ==> v1/Job
  46. NAME                       DESIRED  SUCCESSFUL  AGE
  47. keystone-db-sync           1        1           37m
  48. keystone-credential-setup  1        1           37m
  49. keystone-db-init           1        1           37m
  50. keystone-bootstrap         1        1           37m
  51. keystone-fernet-setup      1        1           37m
  52.  
  53. ==> v2alpha1/CronJob
  54. NAME                        SCHEDULE   SUSPEND  ACTIVE  LAST-SCHEDULE
  55. keystone-credential-rotate  0 0 1 * *  False    0       <none>
  56. keystone-fernet-rotate      0 0 * * 0  False    0       <none>
  57.  
  58. ==> v1beta1/Ingress
  59. NAME      HOSTS                            ADDRESS      PORTS  AGE
  60. keystone  keystone,keystone.os.foo.org  1.2.3.4  80     37m
  61.  
  62. ==> v1beta1/PodDisruptionBudget
  63. NAME          MIN-AVAILABLE  ALLOWED-DISRUPTIONS  AGE
  64. keystone-api  0              1                    37m
  65.  
  66. ==> v1/Secret
  67. NAME                      TYPE    DATA  AGE
  68. keystone-keystone-admin   Opaque  7     37m
  69. keystone-db-user          Opaque  1     37m
  70. keystone-db-admin         Opaque  1     37m
  71. keystone-fernet-keys      Opaque  2     37m
  72. keystone-credential-keys  Opaque  2     37m
  73. ...
  74.  
  75. ###############################################
  76. # Horizon works as I still have a valid cookie, logout/login no longer works...
  77. # everything else starts to break, sometimes I get the hypervisor/images/flavors, other times "Not available"
  78. ###############################################
  79.  
  80. ###############################################
  81. # Assuming ALL fqdn_override's need to be set, I can try the below (keep getting dumps like keystone above - "field is immutable")
  82. ###############################################
  83. export FQDN=.os.foo.org
  84.  
  85. helm upgrade horizon local/horizon --namespace=openstack \
  86.   --set endpoints.dashboard.host_fqdn_override.default=horizon.$FQDN \
  87.   --set endpoints.identity.host_fqdn_override.default=keystone.$FQDN
  88.  
  89. helm upgrade keystone local/keystone \
  90.   --set endpoints.identity.host_fqdn_override.default=keystone.$FQDN
  91.  
  92. helm upgrade glance local/glance \
  93.   --set storage=pvc \
  94.   --set endpoints.image.host_fqdn_override.default=glance.$FQDN \
  95.   --set endpoints.image_registry.host_fqdn_override.default=glance-reg.$FQDN \
  96.   --set endpoints.identity.host_fqdn_override.default=keystone.$FQDN
  97.  
  98. helm upgrade neutron local/neutron \
  99.   --set endpoints.network.host_fqdn_override.default=neutron.$FQDN \
  100.   --set endpoints.compute.host_fqdn_override.default=nova.$FQDN \
  101.   --set endpoints.identity.host_fqdn_override.default=keystone.$FQDN
  102.  
  103. helm upgrade nova local/nova \
  104.   --set endpoints.compute.host_fqdn_override.default=nova.$FQDN \
  105.   --set endpoints.compute_metadata.host_fqdn_override.default=metadata.$FQDN \
  106.   --set endpoints.image.host_fqdn_override.default=glance.$FQDN \
  107.   --set endpoints.network.host_fqdn_override.default=neutron.$FQDN \
  108.   --set endpoints.identity.host_fqdn_override.default=keystone.$FQDN
  109.  
  110.  
  111. ###############################################
  112. # at this point OS is hosed, might as well blow it away and start over...
  113. # note I cannot set any of these fqdn's at helm install, various scripts/jobs/bootstrap using the wrong combination of Ingress URL and internal ports, should be all Ingress url/ports or internal endpoints
  114. ###############################################
  115.  
  116. $ kubectl logs -n openstack keystone-bootstrap-mhdqf
  117.  
  118. + openstack role add --user=admin --user-domain=default --project-domain=default --project=admin _member_
  119. Failed to contact the endpoint at http://keystone.os.foo.org:35357/v3 for discovery. Fallback to using that endpoint as the base url.
  120. Failed to contact the endpoint at http://keystone.os.foo.org:35357/v3 for discovery. Fallback to using that endpoint as the base url.
  121. Failed to contact the endpoint at http://keystone.os.foo.org:35357/v3 for discovery. Fallback to using that endpoint as the base url.
  122. Unable to establish connection to http://keystone.os.foo.org:35357/v3/roles: HTTPConnectionPool(host='keystone.os.foo.org', port=35357): Max retries exceeded with url: /v3/roles (Caused by NewConnectionError('<requests.packages.urllib3.connection.HTTPConnection object at 0x7f4cac480190>: Failed to establish a new connection: [Errno 111] Connection refused',))
Advertisement
Add Comment
Please, Sign In to add comment