diff --git a/environments/standalone.yaml b/environments/standalone.yaml new file mode 100644 index 0000000000..10417e2a24 --- /dev/null +++ b/environments/standalone.yaml @@ -0,0 +1,23 @@ +resource_registry: + OS::TripleO::Network::Ports::RedisVipPort: ../network/ports/noop.yaml + OS::TripleO::Network::Ports::ControlPlaneVipPort: ../deployed-server/deployed-neutron-port.yaml + OS::TripleO::Standalone::Net::SoftwareConfig: ../net-config-standalone.yaml + OS::TripleO::NodeExtraConfigPost: OS::Heat::None + + # Disable non-openstack services that are enabled by default + OS::TripleO::Services::HAproxy: OS::Heat::None + OS::TripleO::Services::Keepalived: OS::Heat::None + OS::TripleO::Services::Kubernetes::Master: OS::Heat::None + OS::TripleO::Services::Kubernetes::Worker: OS::Heat::None + +parameter_defaults: + StackAction: CREATE + SoftwareConfigTransport: POLL_SERVER_HEAT + EnablePackageInstall: true + # Needed for deployed server bits + # FIXME(aschultz): remove after https://review.openstack.org/#/c/567951/ + HostnameMap: + undercloud-standalone-0: undercloud + # Needed for deploying standalone + # FIXME(aschultz): remove after https://review.openstack.org/#/c/566752/ + deployment_source_hosts: overcloud diff --git a/net-config-standalone.j2.yaml b/net-config-standalone.j2.yaml new file mode 100644 index 0000000000..5886300c2a --- /dev/null +++ b/net-config-standalone.j2.yaml @@ -0,0 +1,91 @@ +heat_template_version: rocky +description: > + Software Config to drive os-net-config for a simple bridge configured with a + static IP address for the ctlplane network. +parameters: + ControlPlaneIp: + default: '' + description: IP address/subnet on the ctlplane network + type: string + {%- for network in networks %} + {{network.name}}IpSubnet: + default: '' + description: IP address/subnet on the {{network.name_lower}} network + type: string + {%- endfor %} + ControlPlaneSubnetCidr: # Override this via parameter_defaults + default: '24' + description: The subnet CIDR of the control plane network. + type: string + ControlPlaneStaticRoutes: + default: [] + description: A list of static routes + type: json + DnsServers: # Override this via parameter_defaults + default: [] + description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf. + type: comma_delimited_list + InterfaceLocalMtu: # Override this via parameter_defaults + default: 1500 + description: MTU to use for the local_interface. + type: number + constraints: + - range: { min: 1000, max: 65536 } + StandaloneNetConfigOverride: + default: {} + description: > + Custom JSON data to be used to override the os-net-config data in this + template. This is meant to be used by net_config_override parameter in + tripleoclient to provide an easy means to pass in custom net configs + for a standalone node. + type: json + +conditions: + standalone_net_config_override: + not: + equals: [{get_param: StandaloneNetConfigOverride}, {}] + +resources: + OsNetConfigImpl: + type: OS::Heat::SoftwareConfig + properties: + group: script + inputs: + - name: disable_configure_safe_defaults + default: true + config: + str_replace: + template: + get_file: network/scripts/run-os-net-config.sh + params: + $network_config: + if: + - standalone_net_config_override + - {get_param: StandaloneNetConfigOverride} + - network_config: + - type: ovs_bridge + name: br-ctlplane + use_dhcp: false + dns_servers: + get_param: DnsServers + ovs_extra: + - "br-set-external-id br-ctlplane bridge-id br-ctlplane" + addresses: + - ip_netmask: + list_join: + - / + - - get_param: ControlPlaneIp + - get_param: ControlPlaneSubnetCidr + routes: {get_param: ControlPlaneStaticRoutes} + members: + - type: interface + name: interface_name + # force the MAC address of the bridge to this interface + primary: true + mtu: {get_param: InterfaceLocalMtu} +outputs: + OS::stack_id: + description: The OsNetConfigImpl resource. + value: + get_resource: OsNetConfigImpl + diff --git a/roles/Standalone.yaml b/roles/Standalone.yaml new file mode 100644 index 0000000000..39671a9196 --- /dev/null +++ b/roles/Standalone.yaml @@ -0,0 +1,54 @@ +############################################################################### +# Role: Standalone # +############################################################################### +- name: Standalone + description: | + EXPERIMENTAL. A standalone role that a minimal set of services. + This can be used for testing in a single node configuration with the + 'openstack tripleo deploy --standalone' command. + CountDefault: 1 + tags: + - primary + - controller + disable_constraints: True + ServicesDefault: + - OS::TripleO::Services::Apache + - OS::TripleO::Services::CACerts + - OS::TripleO::Services::CertmongerUser + - OS::TripleO::Services::Collectd + - OS::TripleO::Services::ContainersLogrotateCrond + - OS::TripleO::Services::Docker + - OS::TripleO::Services::DockerRegistry + - OS::TripleO::Services::Etcd + - OS::TripleO::Services::HAProxyInternalTLS + - OS::TripleO::Services::HAProxyPublicTLS + - OS::TripleO::Services::HAproxy + - OS::TripleO::Services::Keepalived + - OS::TripleO::Services::Kernel + - OS::TripleO::Services::Keystone + - OS::TripleO::Services::Kubernetes::Master + - OS::TripleO::Services::Kubernetes::Worker + - OS::TripleO::Services::LoginDefs + - OS::TripleO::Services::MasqueradeNetworks + - OS::TripleO::Services::Memcached + - OS::TripleO::Services::MySQL + - OS::TripleO::Services::MySQLClient + - OS::TripleO::Services::Ntp + - OS::TripleO::Services::OpenShift::GlusterFS + - OS::TripleO::Services::OpenShift::Master + - OS::TripleO::Services::OpenShift::Worker + - OS::TripleO::Services::OsloMessagingNotify + - OS::TripleO::Services::OsloMessagingRpc + - OS::TripleO::Services::Pacemaker + - OS::TripleO::Services::Redis + - OS::TripleO::Services::Rhsm + - OS::TripleO::Services::RsyslogSidecar + - OS::TripleO::Services::Securetty + - OS::TripleO::Services::Snmp + - OS::TripleO::Services::Sshd + - OS::TripleO::Services::TLSProxyBase + - OS::TripleO::Services::Tempest + - OS::TripleO::Services::Timezone + - OS::TripleO::Services::TripleoFirewall + - OS::TripleO::Services::TripleoPackages + - OS::TripleO::Services::Tuned