-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'rackerlabs:main' into heat
- Loading branch information
Showing
19 changed files
with
674 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Kustomize GitHub Actions for cinder-volume-netapp | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- base-kustomize/cinder/netapp/** | ||
- .github/workflows/kustomize-cinder-volume-netapp.yaml | ||
jobs: | ||
kustomize: | ||
name: Kustomize | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Kustomize Install | ||
working-directory: /usr/local/bin/ | ||
run: | | ||
if [ ! -f /usr/local/bin/kustomize ]; then | ||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | sudo bash | ||
fi | ||
- name: Run Kustomize Build | ||
run: | | ||
kustomize build base-kustomize/cinder/netapp/ > /tmp/rendered.yaml | ||
- name: Return Kustomize Build | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: kustomize-cinder-volume-netapp-artifact | ||
path: /tmp/rendered.yaml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: cinder-volume-netapp-config | ||
namespace: openstack | ||
data: | ||
cinder-volume.sh: | | ||
#!/bin/bash | ||
set -ex | ||
exec cinder-volume --config-file /etc/cinder/cinder.conf \ | ||
--config-file /tmp/pod-shared/backends.conf \ | ||
--config-file /tmp/pod-shared/internal_tenant.conf \ | ||
--config-file /tmp/pod-shared/cinder-netapp.conf | ||
generate-backends.py: | | ||
#!/usr/bin/env python3 | ||
import configparser | ||
import os | ||
netapp_backends = os.environ.get('NETAPP_BACKENDS') | ||
config = configparser.ConfigParser() | ||
for backend in netapp_backends.split(';'): | ||
backend = backend.split(',') | ||
assert len(backend) == 11 | ||
config.add_section(backend[0]) | ||
config.set(backend[0], 'netapp_login', backend[1]) | ||
config.set(backend[0], 'netapp_password', backend[2]) | ||
config.set(backend[0], 'netapp_server_hostname', backend[3]) | ||
config.set(backend[0], 'netapp_server_port', backend[4]) | ||
config.set(backend[0], 'netapp_storage_family', 'ontap_cluster') | ||
config.set(backend[0], 'netapp_storage_protocol', 'iscsi') | ||
config.set(backend[0], 'netapp_transport_type', 'http') | ||
config.set(backend[0], 'netapp_vserver', backend[5]) | ||
config.set(backend[0], 'netapp:qos_policy_group', backend[6]) | ||
config.set(backend[0], 'netapp_dedup', backend[7]) | ||
config.set(backend[0], 'netapp_compression', backend[8]) | ||
config.set(backend[0], 'netapp_thick_provisioned', backend[9]) | ||
config.set(backend[0], 'netapp_lun_space_reservation', backend[10]) | ||
config.set(backend[0], 'volume_driver', 'cinder.volume.drivers.netapp.common.NetAppDriver') | ||
config.set(backend[0], 'volume_backend_name', backend[0]) | ||
print(f'Added backend {backend[0]}') | ||
with open('/tmp/pod-shared/backends.conf', 'w') as configfile: | ||
config.write(configfile) | ||
print('Generated backends.conf') | ||
config = configparser.ConfigParser() | ||
backends = ','.join([i.split(',')[0] for i in netapp_backends.split(';')]) | ||
config.set('DEFAULT', 'enabled_backends', backends) | ||
config.set('DEFAULT', 'host', 'cinder-volume-netapp-worker') | ||
with open('/tmp/pod-shared/cinder-netapp.conf', 'w') as configfile: | ||
config.write(configfile) | ||
print('Updated cinder.conf') | ||
ssh_known_hosts: | | ||
# Empty SSH host file managed by cinder-volume-netapp |
Oops, something went wrong.