cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1795
Views
2
Helpful
11
Replies

UCSD scripts, unit testing, and CI/CD

Hello,

I was wondering if anyone uses Unit Testing and CI/CD tools to write and update all javascript scripts in UCSD. UCSD is a great tool helping ITs to be more efficient, but we hear everywhere that ITs have to be agile and be part of DevOps movement. I do my best in promoting DevOps tools like Jenkins, Ansible, and VIRL for testing network configs, but after working for some time with UCSD I can see that it's hard to place that tool within DevOps flow. I was thinking about using some API to run workflows, collect outputs, and compare it with an expected result. However, I cannot find any fast way to update the scripts. It would be nice to have a process, where I update JS code on my laptop, push it to the GIT, then Jenkins fetches the code, runs some Unit Tests on it, and updates the script inside UCSD and runs the workflow at the end. Is it possible to update the script inside the Task without using the GUI?

Cheers,

Krzysztof

1 Accepted Solution

Accepted Solutions

Orf Gelbrich
Cisco Employee
Cisco Employee

With ucsd 6.5 you can have your custom tasks in git hub

View solution in original post

11 Replies 11

Orf Gelbrich
Cisco Employee
Cisco Employee

With ucsd 6.5 you can have your custom tasks in git hub

This is fantastic news :-) Do you know when it will be released?

June or July.

OK, since 6.5 is now available, I downloaded it and upgraded from my previous 6.0. First look - quite nice. However, my first thing to test was GIT feature for custom tasks. And, of cource, I cannot make it work :-) Documentation is very poor (as usual, no suprises here, no samples). My question is how to configure repository. Let's say, I have a gitlab running on host gitlab.domain.local. I created new repo for my username ucsd called ucsd-scripts. So, the url for that repo is http://gitlab.domain.local/ucsd/ucsd-scripts.git. When I clone that repo from some linux or windows box, it gets clonned successfuly. I played with configuring that repo in UCSD, specifying various forms of Repository URL and Repository Name. When I check connectivity it says that ping was successful and login was successful. However, when I try to import the script file from Custom Task, I always get the message:

Repository ucsd-scripts.git not found or repo url gitlab.domain.local/ucsd not reachable

As I said, I tried different URL forms, no luck. Any help/hint?

When you ssh to UCSD and do a nslookup for your FQDN of your URL does it resolve?

Yes, it does. I can ping it by IP and the name.However, I noticed, that ping is successful, connection is successful, but login is unsuccessful. When I clone this repo from another host it is successful, so the user and password should be OK. What protocol is used by UCSD to connect to GIT repo? What part of the full repo link should I put into URL and Name?

I would run a(ssh in as root into UCSD) tail –f /opt/infra/inframgr/logfile.txt to see what is going on while you try these connections.

Well, the logfile is not very chatty, even with debugging set on:

2017-07-18 05:15:42,420 [ORP-1-27] INFO  validateForm(APIProvider.java:1177) - FORM VALIDATE SystemSettings.gitrepo_edit_form

2017-07-18 05:15:42,421 [ORP-1-27] INFO  testURL(AddRepoForm.java:267) - Ping check to gitlab.domain.local

2017-07-18 05:15:42,421 [ORP-1-27] INFO  testURL(AddRepoForm.java:278) - Host gitlab.domain.local is reachable.

2017-07-18 05:15:42,421 [ORP-1-27] INFO  testURL(AddRepoForm.java:287) - Connection check...

2017-07-18 05:15:42,489 [ORP-1-27] INFO  testURL(AddRepoForm.java:296) - Connected successfully to: http://ucsd@gitlab.domain.local/ucsd/

2017-07-18 05:15:42,489 [ORP-1-27] INFO  validateLogin(AddRepoForm.java:165) - Test login  to ucsd@gitlab.domain.local/ucsd/

2017-07-18 05:15:42,491 [ORP-1-27] INFO  run(OperationRequestProcessor.java:138) - Sending response... requestId=6477

2017-07-18 05:20:39,768 [ORP-1-41] DEBUG sendReply(LANServerChannel.java:80) - sending reply ...

Can you send me a screenshot of how this repository should be properly filled, so at least I know where to start debugging? Is it something wrong I filled in UCSD or should I check gitlab user rights or something else?

I have not tested this yet.

Hello

I have the same problem in my environment. Ping and repository connection succesfull. Login doesn't work.

It is also a gitlab server. Do you find solution for this problem?

Thanks,

Fabian

No luck. I sniffed all the traffic between the UCSD and the Gitlab and it seems UCSD does not implement authentication properly. Even if I specify login and password in the URL, the message is always the same "Login unsuccessful". I also defined the repo as public, so no authentication is required at all, and still UCSD says "Login unsuccessful"

I hope this gets to the BU somehow, as this feature is quite lousy implemented here. First, no documentation with samples is available (nothing new from Cisco). Second, the idea itself is pretty lame. Why would I need to get the script from the GIT if I have to click through all the GUI and fetch the script manually. This feature is not only useless, but not working at all...

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Cisco UCS X-Series Energy Efficiency Offer