Hi Pratap, I am currently planning to implement few GITLAB pipelines to interact with APIC V10, Providing application access/subscription to the Products. Could you please help provide the steps or suggestions to achieve this in Gitlab.
Original Message:
Sent: Thu April 04, 2024 11:37 AM
From: Prateep Kumar
Subject: How to run API commands from GitLab
Hi Sila,
Thanks for the response. It helps me to think different and found the solution. Actually I was using wrong command and the old version of APIC. Below command is working fine. We just need to download the Linux Toolkit package from API Manager and place it in our GitLab repository before we run the commands.
chmod +x apic-slim
./apic-slim --accept-license
./apic-slim login --server <<API Manager_server>> --sso --apiKey <<APIkey from APIManager>> --context provider
------------------------------
Prateep Kumar
Original Message:
Sent: Wed April 03, 2024 10:36 AM
From: SILA KISSUU
Subject: How to run API commands from GitLab
Hello Prateep,
This might resolve your login question:
https://community.ibm.com/community/user/integration/blogs/ricky-moorhouse1/2021/03/30/whats-new-reserved-instance-v10-automation
------------------------------
Sila Kissuu
Original Message:
Sent: Tue April 02, 2024 09:42 AM
From: Prateep Kumar
Subject: How to run API commands from GitLab
Dear All,
Hope you all doing well.
Basically, I'm trying to enable CI/CD for API connect from GitLab.
I am unable to run apic commands from GitLab yaml file. It is not able to recognise apic commands. So I'm trying to add the apic package in the script but I need to know the exact package name to mention in the yaml file. Also I would like to know the APIC's docker image available in the docker hub so that I could mention it in the file.
As of now, I have a placed a apic exe file in the repository to run the apic commands. The problem is "apic login" command needs a credentials for cloud manager admin for authentication. Almost everywhere in IBM documentation, the below command is mentioned to login to API manager console which requires cloud manager admin credentials. Is there any way to get access to cloud manager?
"apic login --server mgmt_endpoint_url --username user_id --password password --realm realm"
I found another apic login command with sso option below and it works fine in CLI, but it's not working when I run it from GitLab. Its unable to read the parameters in the command after sso and its asking to open a browser to get apiKey for authentication.
apic login -sso --server <<server-name>> --apiKey <<api_key>> --context provider
Please help to find me a right command or procedure to run apic login to API manager.
------------------------------
Kind Regards,
Prateep Kumar
------------------------------