Skip to content

Commit

Permalink
Cisco ACI Plugin for ODIM RA 23.08 Release (#120)
Browse files Browse the repository at this point in the history
* Update Dependency

* update deployment instructions

* Create codeql.yml

* Upgrade golang version to 1.19.5

* Upgrade the image versions in plugin

* Update README.md

Updated the image version

* upgrade ubuntu version to 22.04

* updating the cert for ut

* Updated image form 3.2 to 3.3

* updated aci image version to 3.3 as per team feedback (#119)

Co-authored-by: Jeevan Kamkar <68366409+jeevan-kamkar@users.noreply.github.com>

---------

Co-authored-by: rahul chaube <rahul.chaube@hpe.com>
Co-authored-by: Shiva Charan M S <shiva-charan.m-s@hpe.com>
Co-authored-by: sunitha-somanna <sunitha-somanna@hpe.com>
Co-authored-by: ashraf-vazeer <46555462+ashraf-vazeer@users.noreply.github.com>
Co-authored-by: hemkapoor <hemant.kapoor@hpe.com>
Co-authored-by: Banoshi <akshata-s.banoshi@hpe.com>
Co-authored-by: jeevan.kamkar <jeevan.kamkar@hpe.com>
Co-authored-by: Jeevan Kamkar <68366409+jeevan-kamkar@users.noreply.github.com>
Co-authored-by: Sunitha <82936788+sunithasomanna@users.noreply.github.com>
  • Loading branch information
10 people authored Sep 1, 2023
1 parent 61e3a9f commit 82ff78b
Show file tree
Hide file tree
Showing 15 changed files with 909 additions and 812 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build_unittest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:
jobs:
build:
name: Build
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Compilation
Expand All @@ -34,10 +34,10 @@ jobs:
echo "PluginCiscoACI build failed"
exit1
fi
- name: Set up Go 1.17.2
- name: Set up Go 1.19.5
uses: actions/setup-go@v2
with:
go-version: 1.17.2
go-version: 1.19.5
id: go
- name: Test
run: |
Expand Down
74 changes: 74 additions & 0 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ "development" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "development" ]
schedule:
- cron: '26 15 * * 1'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'go' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# Autobuild attempts to build any compiled languages (C/C++, C#, Go, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun

# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
# echo "Run, Build Application using script"
# ./location_of_script_within_repo/buildscript.sh

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
with:
category: "/language:${{matrix.language}}"
18 changes: 13 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,15 @@ Kubernetes cluster is set up and the resource aggregator is successfully deploye
```

3. ```
export ODIMRA_USER_ID=2021 ; export ODIMRA_GROUP_ID=2021 ; ./build_images.sh
export ODIMRA_USER_ID=2021
```
4. ```
export ODIMRA_GROUP_ID=2021
```

5. ```
./build_images.sh
```

4. On the deployment node, copy the Cisco ACI plugin configuration file and the hook script to `~/plugins/aciplugin`.
Expand Down Expand Up @@ -110,7 +118,7 @@ Kubernetes cluster is set up and the resource aggregator is successfully deploye
odimUserName: admin
odimPassword: H/r7PSBpgBafwA2UPPm6CrkGTBT9H0VJX0EQKz61ktpCJbdUXUiJdoX1LoU2JMxPEQPPv2tU4z1BO0HtiELe8muJ7VilCmW51zMWv0D7O+qjV4IxhvZ5EZT4tHqfjJwBSBBZZ5cV11ceic5p8L26soCT8KMNTRhksYVQJXUJnyT6qiNuTrLAIouJ4kj4xIdelpP4Zgzy7fdyd+x+yQP2DPWgCF5fYErmk7H7gxVibay1YUaE6qVAbYypqwRmUHIjnv3VC3qTRyRfwGMWEm+xD5ySNUOocXqUORuFcSPWDpZYXWRKSYnwKA+XZuCdm6KUiqU84Hyq4O5hWLwz51XZ/SutnOIoZoooqKxhMwmqLvAsx8/ndG9m2j+M/Vx+Cm22OWweGMKvXP5xKqR5X2bMybvLbKb+mJLW8WxjM+EI+Y4XpgunRlsaExYRW/4GCg7vWcvQ8Sc5a74n20+sNKqjqs/SgLdmJTzfh/6MN0TSfn8DtALJiN/17KAyTjH/2YO/arguin/eYiMfO9X6avgjy7x2ceOzUJFaWkWEOYMV8Ksm4msvlfhHcZ+2NgIsJRgfZgbO49+K+0jwQ7p7fXv5GOcFJ6HMVPNTJ8kCayU0Yh50bsqv3e7KTIERT1XyI6zXa7LYk5sswOvl7gsndE3vkPddrHg+m194tFo92chsnv0=
```

6. Update the following parameters in the plugin configuration file:

- **eventListenerNodePort**: The port used for listening to the ACI plugin events. Default port is 30086.
Expand Down Expand Up @@ -142,9 +150,9 @@ Kubernetes cluster is set up and the resource aggregator is successfully deploye
```
echo -n '< ODIMRA password>' |openssl pkeyutl -encrypt -inkey <odimCertsPath>/odimra_rsa.private -pkeyopt rsa_padding_mode:oaep -pkeyopt rsa_oaep_md:sha512|openssl base64 -A
```

Other parameters can have default values. Optionally, you can update them with values based on your requirements. For more information on each parameter, see [Plugin configuration parameters](#plugin-configuration-parameters).

7. Generate the Helm package for the Cisco ACI plugin on the deployment node:

1. Navigate to `PluginCiscoACI/install/Kubernetes/helmcharts`.
Expand All @@ -164,7 +172,7 @@ Kubernetes cluster is set up and the resource aggregator is successfully deploye
8. Save the Cisco ACI plugin Docker image on the deployment node at `~/plugins/aciplugin`.

```
docker save aciplugin:3.1 -o ~/plugins/aciplugin/aciplugin.tar
docker save aciplugin:3.3 -o ~/plugins/aciplugin/aciplugin.tar
```

9. Navigate to the `PluginCiscoACI` directory.
Expand Down
2 changes: 1 addition & 1 deletion build/Dockerfile.builddep
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.17.2
FROM golang:1.19.5

WORKDIR /aci-plugin/

Expand Down
2 changes: 1 addition & 1 deletion build_images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ else
fi


/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.aciplugin -t aciplugin:3.1 $build_args .
/usr/bin/docker build -f install/Docker/dockerfiles/Dockerfile.aciplugin -t aciplugin:3.3 $build_args .
Loading

0 comments on commit 82ff78b

Please sign in to comment.