Skip to content

Commit

Permalink
Bump github/super-linter from 6 to 7 (#360)
Browse files Browse the repository at this point in the history
* Bump github/super-linter from 6 to 7

Bumps [github/super-linter](https://github.com/github/super-linter) from 6 to 7.
- [Release notes](https://github.com/github/super-linter/releases)
- [Changelog](https://github.com/github/super-linter/blob/main/CHANGELOG.md)
- [Commits](github/super-linter@v6...v7)

---
updated-dependencies:
- dependency-name: github/super-linter
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Linting fixes

* No community.egi.eu

* Quotes

* Linting

* Linting

* regexp

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Enol Fernández <[email protected]>
  • Loading branch information
dependabot[bot] and enolfc authored Sep 9, 2024
1 parent 44e8db9 commit a0ec73e
Show file tree
Hide file tree
Showing 43 changed files with 727 additions and 731 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-cloud-info.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'Deploy cloud-info'
name: "Deploy cloud-info"

on:
push:
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy-image-sync.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
name: 'Deploy image sync'
name: "Deploy image sync"

on:
push:
Expand All @@ -16,4 +16,3 @@ jobs:
dir: "deploy/image-sync"
tags: "docker,image-sync"
secrets: inherit

2 changes: 1 addition & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:

jobs:
terraform:
name: 'Terraform'
name: "Terraform"
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,13 @@ jobs:

# Runs the Super-Linter action
- name: Run Super-Linter
uses: github/super-linter/slim@v6
uses: github/super-linter/slim@v7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Disabling these two for the moment, should be enabled later
VALIDATE_CHECKOV: false
VALIDATE_PYTHON_PYLINT: false
# Black is good enough for us
VALIDATE_PYTHON_PYINK: false
# Disabling this file as it gets confused
FILTER_REGEX_EXCLUDE: ".*.env.j2"
2 changes: 1 addition & 1 deletion .github/workflows/molecule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '>=3.9'
python-version: ">=3.9"
- name: Install dependencies
run: |
pip install molecule molecule-plugins[docker] pytest pytest-testinfra
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/python.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Test cloud-info-generator
run: |
cd cloud-info
pip install -r requirements.txt
pip install .
cd cloud_info_catchall
python3 -m unittest
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Test cloud-info-generator
run: |
cd cloud-info
pip install -r requirements.txt
pip install .
cd cloud_info_catchall
python3 -m unittest
13 changes: 4 additions & 9 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,15 @@ in mind that contributions regarding how to best contribute are also welcome.

## Feedback and Questions

If you wish to discuss anything related to the project, please open an issue or
start a topic on the [EGI Community Forum](https://community.egi.eu).
The maintainers will sometimes move issues off of GitHub to the community forum
if it is thought that longer, more open-ended discussion would be beneficial,
including a wider community scope.
If you wish to discuss anything related to the project, please open an issue.

## Contribution Process

Before proposing a contribution via pull request, ideally there is an open
issue describing the need for your contribution (refer to this issue number
when you submit the pull request). We have a 3 steps process for contributions.

1. Fork the project if you have not, and commit changes to a git branch
1. Fork the project if you have not, and commit changes to a Git branch
1. Create a GitHub Pull Request for your change, following the instructions
in the pull request template.
1. Perform a [Code Review](#code-review-process) with the maintainers on the
Expand Down Expand Up @@ -51,7 +47,7 @@ follows:
1. If a maintainer has feedback or questions on your changes then they will set
`request changes` in the review and provide an explanation.

## Using git
## Using Git

For collaboration purposes, it is best if you create a GitHub account and fork
the repository to your own account. Once you do this you will be able to push
Expand All @@ -60,7 +56,7 @@ be easier to send pull requests.

### Branches and Commits

You should submit your patch as a git branch named after the GitHub issue, such
You should submit your patch as a Git branch named after the GitHub issue, such
as `#3`\. This is called a _topic branch_ and allows users to associate a
branch of code with the issue.

Expand Down Expand Up @@ -92,7 +88,6 @@ EGI benefits from a strong community of developers and system administrators,
and vice-versa. If you have any questions or if you would like to get involved
in the wider EGI community you can check out:

- [EGI Community Forum](https://community.egi.eu/)
- [EGI site](https://www.egi.eu)

**This file has been modified from the Chef Cookbook Contributing Guide**.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ generated in this repository.
## Deployment
Deployment is managed with GitHub actions, there is a VM for the
Deployment is managed with GitHub Actions, there is a VM for the
cloud-info-provider and one VM for the image sync. Check the [deploy](./deploy)
directory for details. Configuration is done with ansible using a
[dedicated role](./deploy/roles/catchall):
Expand Down
12 changes: 6 additions & 6 deletions caso/voms.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
{
"ops": {
"projects": ["ops"]
},
"fedcloud.egi.eu": {
"projects": ["foo", "bar"]
}
"ops": {
"projects": ["ops"]
},
"fedcloud.egi.eu": {
"projects": ["foo", "bar"]
}
}
60 changes: 30 additions & 30 deletions cloud-info/openstack.yaml
Original file line number Diff line number Diff line change
@@ -1,36 +1,36 @@
site:
name: SITE-NAME
name: SITE-NAME

compute:
# Configure here the VOs supported at your installation
shares:
# Name of the VO
ops:
# Authentication for the VO into OpenStack
auth:
# the project id in OpenStack
project_id: xxxxx
# Default network type: none, public, public_only, private, private_only
default_network_type: public
# Public Network name
public_network_name: PUBLIC
# Configure here the VOs supported at your installation
shares:
# Name of the VO
ops:
# Authentication for the VO into OpenStack
auth:
# the project id in OpenStack
project_id: xxxxx
# Default network type: none, public, public_only, private, private_only
default_network_type: public
# Public Network name
public_network_name: PUBLIC

# A second VO
# fedcloud.egi.eu:
# auth:
# project_id: xxxx
# # Default network type: none, public, public_only, private, private_only
# default_network_type: public
# # Public Network name
# public_network_name: PUBLIC
# A second VO
# fedcloud.egi.eu:
# auth:
# project_id: xxxx
# # Default network type: none, public, public_only, private, private_only
# default_network_type: public
# # Public Network name
# public_network_name: PUBLIC

# Add as many VOs as needed
# Add as many VOs as needed

# Total number of cores available
total_cores: 0
# Total RAM available (GB)
total_ram: 0
# Hypervisor name
hypervisor: Foo Hypervisor
# Hypervisor version
hypervisor_version: 0.0.0
# Total number of cores available
total_cores: 0
# Total RAM available (GB)
total_ram: 0
# Hypervisor name
hypervisor: Foo Hypervisor
# Hypervisor version
hypervisor_version: 0.0.0
3 changes: 2 additions & 1 deletion deploy/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@ Deployment is performed in 2 phases:
1. Terraforming the VM where the cloud-info-provider is run
1. Configuring the VM with ansible to run the cloud-info-provider

Everything is managed automatically via GitHub actions, on pull-requests
Everything is managed automatically via GitHub Actions, on pull-requests
the terraform plan is updated and when merging, it's applied and
ansible is run on the resulting infrastructure.

### Secrets

Secrets are stored in GitHub. These include:

- `ANSIBLE_SECRETS`: `yaml` file with robot account credentials and AMS token
for pushing messages
- `APP_ID` and `APP_PRIVATE_KEY`: credentials for GitHub app capable of
Expand Down
6 changes: 3 additions & 3 deletions deploy/cloud-init.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ write_files:
./deploy.sh "$OAUTH_TOKEN" "$COMMIT_SHA" "$FEDCLOUD_LOCKER_TOKEN" \
"$TAGS" "$SHORT_COMMIT_SHA" "$SLACK_WEBHOOK_URL"
path: /var/lib/cloud/scripts/per-boot/deploy.sh
permissions: '0755'
permissions: "0755"
- content: |
#!/bin/sh
Expand All @@ -58,7 +58,7 @@ write_files:
retry -t 10 -d 90 -- openstack --os-cloud backend object create \
--name "$VM_ID" fedcloud-catchall "/var/tmp/egi/$VM_ID"
path: /usr/local/bin/notify.sh
permissions: '0755'
permissions: "0755"
- content: |
[Unit]
Description=Notify the github action
Expand All @@ -72,4 +72,4 @@ write_files:
- content: "%CLOUDS_YAML%"
encoding: base64
path: /etc/openstack/clouds.yaml
permissions: '0644'
permissions: "0644"
4 changes: 2 additions & 2 deletions deploy/image-sync/extra-cloud-init.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Disk layout
disk_setup:
/dev/sdb:
table_type: 'mbr'
table_type: "mbr"
layout: true
overwrite: false
fs_setup:
Expand All @@ -10,4 +10,4 @@ fs_setup:
partition: any
overwrite: false
mounts:
- [ /dev/sdb, /var/cache/image-sync ]
- [/dev/sdb, /var/cache/image-sync]
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ def test_site_files_region(host):
assert host.file("/etc/egi/cloud-info/%s.yaml" % filename).exists
assert host.file("/etc/egi/cloud-info/%s.env" % filename).exists
assert host.file("/etc/egi/cloud-info/%s.env" % filename).contains(
"OS_REGION=region1"
'OS_REGION="region1"'
)
assert host.file("/etc/cron.d/cloud-info-%s" % filename).exists
4 changes: 2 additions & 2 deletions deploy/roles/catchall/tasks/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
state: directory
mode: "775"
notify:
- Restart docker
- Restart docker

- name: Configure docker
ansible.builtin.copy:
Expand All @@ -54,4 +54,4 @@
dest: /etc/docker/daemon.json
mode: "660"
notify:
- Restart docker
- Restart docker
3 changes: 1 addition & 2 deletions deploy/roles/catchall/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
apply:
tags: "docker"
# this is only executed if explicity requested
tags: ['never', 'docker']
tags: ["never", "docker"]

- name: Load site configuration
tags: ["cloud-info", "image-sync"]
Expand Down Expand Up @@ -53,7 +53,6 @@
- "{{ sites }}"
when: sites is iterable


- name: Image sync config
tags: ["image-sync"]
ansible.builtin.include_tasks:
Expand Down
18 changes: 9 additions & 9 deletions deploy/roles/catchall/templates/cloud-info.env.j2
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
AMS_HOST={{ ams_host }}
AMS_PROJECT={{ ams_project }}
AMS_TOKEN={{ ams_token }}
CHECKIN_OIDC_TOKEN={{ checkin.token_endpoint }}
AMS_HOST="{{ ams_host }}"
AMS_PROJECT="{{ ams_project }}"
AMS_TOKEN="{{ ams_token }}"
CHECKIN_OIDC_TOKEN="{{ checkin.token_endpoint }}"
CHECKIN_SECRETS_PATH=/etc/egi/vos/
CLOUD_INFO_CONFIG=/etc/egi/cloud-info/{{ filename }}.yaml
CLOUD_INFO_CONFIG="/etc/egi/cloud-info/{{ filename }}.yaml"
OS_AUTH_TYPE=v3oidcaccesstoken
OS_AUTH_URL={{ site.endpoint }}
OS_AUTH_URL="{{ site.endpoint }}"
OS_IDENTITY_PROVIDER=egi.eu
OS_PROTOCOL={{ site.protocol | default('openid') }}
OS_PROTOCOL="{{ site.protocol | default('openid') }}"
{% if "region" in site %}
OS_REGION={{ site.region }}
OS_REGION="{{ site.region }}"
{% endif %}
SITE_NAME={{ site.gocdb }}
SITE_NAME="{{ site.gocdb }}"
48 changes: 24 additions & 24 deletions sites/BIFI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,27 @@
gocdb: BIFI
endpoint: https://colossus.cesar.unizar.es:5000/v3
vos:
- name: covid19.eosc-synergy.eu
auth:
project_id: f07679a8d4ac40379b51db4236bc3c27
- name: eosc-synergy.eu
auth:
project_id: 0c1de26753ed4311a6cefff9094ad3e3
- name: lagoproject.net
auth:
project_id: 21a85c6ead0346b08e22709d0422799d
- name: o3as.data.kit.edu
auth:
project_id: 621b1977bb384beab1519713c7e695f0
- name: ops
auth:
project_id: 6930771153aa4b8d8637222dec8fd949
- name: worsica.vo.incd.pt
auth:
project_id: 46f55a92f3904d509d75525930d8d0eb
- name: vo.phiri.eu
auth:
project_id: 1d64c6e5237b46af8acb44f79b7b5a15
- name: vo.bd4nrg.eu
auth:
project_id: 3e18859848be489a8d741b264049f4a9
- name: covid19.eosc-synergy.eu
auth:
project_id: f07679a8d4ac40379b51db4236bc3c27
- name: eosc-synergy.eu
auth:
project_id: 0c1de26753ed4311a6cefff9094ad3e3
- name: lagoproject.net
auth:
project_id: 21a85c6ead0346b08e22709d0422799d
- name: o3as.data.kit.edu
auth:
project_id: 621b1977bb384beab1519713c7e695f0
- name: ops
auth:
project_id: 6930771153aa4b8d8637222dec8fd949
- name: worsica.vo.incd.pt
auth:
project_id: 46f55a92f3904d509d75525930d8d0eb
- name: vo.phiri.eu
auth:
project_id: 1d64c6e5237b46af8acb44f79b7b5a15
- name: vo.bd4nrg.eu
auth:
project_id: 3e18859848be489a8d741b264049f4a9
Loading

0 comments on commit a0ec73e

Please sign in to comment.