Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

testing: lint and docs improvements #24

Merged
merged 1 commit into from
Aug 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions config/ansible-lint.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
exclude_paths:
- .github

skip_list:
# Hide "wrong indentation: expected 4 but found 2 (indentation)"
# until we find out how to properly configure it
- 'yaml'
- 'yaml[indentation]'
- 'yaml[line-length]'
# Do not force galaxy info in meta/main.yml
- 'meta-no-info'
# Hide "Commands should not change things if nothing needs doing"
Expand All @@ -16,8 +20,5 @@ skip_list:
- 'deprecated-local-action'
- 'no-free-form'
- 'chema[meta]'
- 'yaml[truthy]'
- 'risky-file-permissions'
- 'ignore-errors'
- 'no-changed-when'
- 'fqcn'
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Benchmarking.download_coco_dataset

# Parameters
# Hostname of the node where the download pod will be executed.
# Mandatory value
benchmarking_deploy_coco_dataset_node_hostname:
Expand All @@ -17,4 +18,3 @@ benchmarking_deploy_coco_dataset_storage_dir: /storage

# Path to credentials to use for accessing the dataset s3 bucket.
benchmarking_deploy_coco_dataset_s3_cred:

Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
template:
src: "{{ coco_dataset_pvc }}"
dest: "{{ artifact_extra_logs_dir }}/001_pvc_coco-dataset.yml"
mode: 0400
mode: '0400'

- name: Check if the PVC already exists
command: oc get -f "{{ artifact_extra_logs_dir }}/001_pvc_coco-dataset.yml" -oname
Expand All @@ -52,7 +52,7 @@
template:
src: "{{ coco_dataset_pod }}"
dest: "{{ artifact_extra_logs_dir }}/002_pod_coco-dataset.yml"
mode: 0400
mode: '0400'

- name: Delete the Pod, if it exists
command:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Benchmarking.run_mlperf_ssd

# Parameters
# Hostname of the node where the ssd benchmark will be executed.
# Mandatory value
benchmarking_run_mlperf_ssd_node_hostname:
Expand All @@ -19,4 +20,3 @@ benchmarking_run_mlperf_ssd_epochs:
# Benchmark threshold target value.
# Type: Float
benchmarking_run_mlperf_ssd_threshold:

Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ benchmarking_run_mlperf_ssd_dataset_pvc_name: "benchmarking-coco-dataset"
benchmarking_run_mlperf_ssd_entrypoint_cm_name: "benchmarking-mlperf-ssd-entrypoint"

# name of the pod running the SSD benchmark
benchmarking_run_mlperf_ssd_name: "benchmarking-mlperf-ssd"
benchmarking_run_mlperf_ssd_name: "benchmarking-mlperf-ssd"
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
template:
src: "{{ benchmarking_mlperf_ssd_pod }}"
dest: "{{ artifact_extra_logs_dir }}/001_pod_run-mlperf-ssd.yml"
mode: 0400
mode: '0400'

- name: Delete the Pod, if it exists
command:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.capture_environment

4 changes: 2 additions & 2 deletions roles/cluster/cluster_capture_environment/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
copy:
content: "{{ git_version.stdout }}"
dest: "{{ artifact_extra_logs_dir }}/ci_artifact.git_version"
mode: 0644
mode: '0644'

- name: Fetch ci-artifact last git commit
command:
Expand All @@ -53,7 +53,7 @@
copy:
content: "{{ git_show.stdout }}"
dest: "{{ artifact_extra_logs_dir }}/ci_artifact.git_commit"
mode: 0644
mode: '0644'

- name: Get the cluster nodes status
shell:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.create_htpasswd_adminuser

# Parameters
# Username of the htpasswd user.
# Mandatory value
cluster_create_htpasswd_user_username:
Expand All @@ -13,6 +14,7 @@ cluster_create_htpasswd_user_passwordfile:
# If True, waits for the user to be able to login into the cluster.
cluster_create_htpasswd_user_wait: false

# Constants
# Name of the secret that will contain the htpasswd passwords
# Defined as a constant in Cluster.create_htpasswd_adminuser
cluster_create_htpasswd_user_secret_name: htpasswd-secret
Expand All @@ -28,4 +30,3 @@ cluster_create_htpasswd_user_role: cluster-admin
# Name of the group that will be created for the user
# Defined as a constant in Cluster.create_htpasswd_adminuser
cluster_create_htpasswd_user_groupname: local-admins

3 changes: 2 additions & 1 deletion roles/cluster/cluster_create_htpasswd_user/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
template:
src: "{{ cluster_create_htpasswd_user_oauth }}"
dest: "{{ artifact_extra_logs_dir }}/oauth_htpasswd.yaml"
mode: 0400
mode: '0400'

- name: Append the htpasswd OAuth identity provider
shell:
Expand Down Expand Up @@ -74,6 +74,7 @@
ansible.builtin.file:
path: /tmp/user_kubeconfig
state: touch
mode: '0644'

- name: Wait for the authentication to work
when: cluster_create_htpasswd_user_wait | bool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
cluster_create_htpasswd_user_oauth: "roles/cluster/cluster_create_htpasswd_user/templates/oauth.yml.j2"
cluster_create_htpasswd_user_oauth: "roles/cluster/cluster_create_htpasswd_user/templates/oauth.yml.j2"
5 changes: 3 additions & 2 deletions roles/cluster/cluster_create_osd/defaults/main/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.create_osd

# Parameters
# The name to give to the cluster.
# Mandatory value
cluster_create_osd_cluster_name:
Expand Down Expand Up @@ -30,6 +31,7 @@ cluster_create_osd_compute_machine_type: m5.xlarge
# Type: Int
cluster_create_osd_compute_nodes: 2

# Constants
# Name of the worker node machinepool
# Defined as a constant in Cluster.create_osd
cluster_create_osd_machinepool_name: default
Expand All @@ -41,4 +43,3 @@ cluster_create_osd_kubeadmin_group: cluster-admins
# Name of the admin account that will be created.
# Defined as a constant in Cluster.create_osd
cluster_create_osd_kubeadmin_name: kubeadmin

Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.deploy_aws_efs

4 changes: 2 additions & 2 deletions roles/cluster/cluster_deploy_aws_efs/tasks/aws-efs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@
set_fact:
cluster_tags: "{{ cluster_tags | default({}) | combine({item.key: item.value}) }}"
with_items:
- {'key': 'Name' , 'value': '{{ cluster_name_cmd.stdout }}'}
- {'key': '{{ cluster_name_tag_cmd.stdout }}' , 'value': 'owned'}
- {'key': 'Name', 'value': '{{ cluster_name_cmd.stdout }}'}
- {'key': '{{ cluster_name_tag_cmd.stdout }}', 'value': 'owned'}
- {'key': 'Purpose', 'value': ''}

- name: Get the SecurityGroup content
Expand Down
4 changes: 2 additions & 2 deletions roles/cluster/cluster_deploy_aws_efs/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
template:
src: "{{ cluster_deploy_aws_efs_csi_driver }}"
dest: "{{ artifact_extra_logs_dir }}/csi-driver.yml"
mode: 0400
mode: '0400'

- name: Create the ClusterCSIDriver resource
command: oc apply -f "{{ artifact_extra_logs_dir }}/csi-driver.yml"
Expand All @@ -35,7 +35,7 @@
template:
src: "{{ cluster_deploy_aws_efs_storage_class }}"
dest: "{{ artifact_extra_logs_dir }}/storage-class.yml"
mode: 0400
mode: '0400'

- name: Create the StorageClass resource
command: oc apply -f "{{ artifact_extra_logs_dir }}/storage-class.yml"
3 changes: 1 addition & 2 deletions roles/cluster/cluster_deploy_kepler/defaults/main/config.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.deploy_kepler

2 changes: 1 addition & 1 deletion roles/cluster/cluster_deploy_kepler/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
git --git-dir "{{ kepler_location }}/.git" show

- name: Deploy kepler-operator
shell:
shell:
cd "{{ kepler_location }}"; make deploy OPERATOR_IMG=quay.io/sustainable_computing_io/kepler-operator:latest
register: deploy_kepler
delay: 3
Expand Down
5 changes: 3 additions & 2 deletions roles/cluster/cluster_deploy_ldap/defaults/main/config.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.deploy_ldap

# Parameters
# Name of the LDAP identity provider.
# Mandatory value
cluster_deploy_ldap_idp_name:
Expand Down Expand Up @@ -31,7 +32,7 @@ cluster_deploy_ldap_cluster_name: null
# If True, waits for the first user (0) to be able to login into the cluster.
cluster_deploy_ldap_wait: false

# Constants
# Name of the admin user
# Defined as a constant in Cluster.deploy_ldap
cluster_deploy_ldap_admin_user: admin

3 changes: 2 additions & 1 deletion roles/cluster/cluster_deploy_ldap/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
template:
src: "{{ cluster_deploy_ldap_oauth }}"
dest: "{{ artifact_extra_logs_dir }}/oauth_ldap.yaml"
mode: 0400
mode: '0400'

- name: Get LDAP URL
command:
Expand Down Expand Up @@ -168,6 +168,7 @@
ansible.builtin.file:
path: /tmp/user_kubeconfig
state: touch
mode: '0644'

- name: Wait for the authentication to work
when: cluster_deploy_ldap_wait | bool
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.deploy_minio_s3_server

# Parameters
# Path of a file containing the properties of S3 secrets.
# Mandatory value
cluster_deploy_minio_s3_server_secret_properties_file:
Expand All @@ -12,11 +13,11 @@ cluster_deploy_minio_s3_server_namespace: minio
# The name of the default bucket to create in Minio.
cluster_deploy_minio_s3_server_bucket_name: myBucket

# Constants
# Name of the Minio admin user
# Defined as a constant in Cluster.deploy_minio_s3_server
cluster_deploy_minio_s3_server_root_user: admin

# Name of the user/access key to use to connect to the Minio server
# Defined as a constant in Cluster.deploy_minio_s3_server
cluster_deploy_minio_s3_server_access_key: minio

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.deploy_nfs_provisioner

# Parameters
# The namespace where the resources will be deployed
cluster_deploy_nfs_provisioner_namespace: nfs-provisioner

Expand All @@ -16,4 +17,3 @@ cluster_deploy_nfs_provisioner_storage_class_name: nfs-provisioner

# Set to true to mark the storage class as default in the cluster
cluster_deploy_nfs_provisioner_default_sc: false

Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ spec:
app: nfs-provisioner
replicas: 1
strategy:
type: Recreate
type: Recreate
template:
metadata:
labels:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
- ReadWriteOnce
resources:
requests:
storage: 500Gi
storage: 500Gi
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ spec:
- name: nfs-pvc
persistentVolumeClaim:
claimName: shared-folder

Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,3 @@ spec:
- name: nfs-pvc
persistentVolumeClaim:
claimName: shared-folder

Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.deploy_nginx_server

# Parameters
# namespace where the server will be deployed. Will be create if it doesn't exist.
# Mandatory value
cluster_deploy_nginx_server_namespace:

# directory containing the files to serve on the HTTP server.
# Mandatory value
cluster_deploy_nginx_server_directory:

Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.deploy_operator

# Parameters
# Name of the catalog containing the operator.
# Mandatory value
cluster_deploy_operator_catalog:
Expand Down Expand Up @@ -37,4 +38,3 @@ cluster_deploy_operator_namespace_monitoring: false
# If set, deploy the CSV in all the namespaces.
# Type: Bool
cluster_deploy_operator_all_namespaces: false

6 changes: 3 additions & 3 deletions roles/cluster/cluster_deploy_operator/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
template:
src: "{{ cluster_deploy_operator_res_ns }}"
dest: "{{ artifact_extra_logs_dir }}/src/000_namespace.yml"
mode: 0400
mode: '0400'

- name: Check if the namespace exists
command: oc get "ns/{{ cluster_deploy_operator_namespace }}"
Expand All @@ -217,7 +217,7 @@
template:
src: "{{ cluster_deploy_operator_res_group }}"
dest: "{{ artifact_extra_logs_dir }}/src/001_operator_group.yml"
mode: 0400
mode: '0400'

- name: Instantiate the OperatorHub OperatorGroup resource
command: oc apply -f "{{ artifact_extra_logs_dir }}/src/001_operator_group.yml"
Expand All @@ -226,7 +226,7 @@
template:
src: "{{ cluster_deploy_operator_res_sub }}"
dest: "{{ artifact_extra_logs_dir }}/src/002_sub.yml"
mode: 0400
mode: '0400'

- name: Instantiate the Subscription
command: oc apply -f "{{ artifact_extra_logs_dir }}/src/002_sub.yml"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Auto-generated file, do not edit manually ...
# Auto-generated file, do not edit manually ...
# Toolbox generate command: repo generate_ansible_default_settings
# Source component: Cluster.deploy_redis_server

# Parameters
# namespace where the server will be deployed. Will be create if it doesn't exist.
# Mandatory value
cluster_deploy_redis_server_namespace:

Loading
Loading