Purpose:


This article shows how to upload the OSSPACK of FlexVNF(VOS) to VD in offline mode. In some situations, the Versa Director doesn't have internet access to download the OSSPACK. This article will help to upload OSSPACK in this situation.



Download the OSSPACK to your local system or Jump server and SCP to VD. 

Place the flexvnf OSSPACK  "versa-flexvnf-osspack-20220708.bin" in /var/versa/packages/osspack/versa-flexvnf/

Place the flexvnf OSSPACK  "versa-flexvnf-osspack-20220708.bin" in /var/versa/packages/osspack/versa-director/


Skip Step (2) if Director is not on 21.X.X release.


(2) If the Director is on 21.2:

Rename the file name from versa-flexvnf-osspack-20xxxxx.bin to versa-flexvnf-osspack-20xxxxx-trusty.bin for Trusty release and versa-flexvnf-osspack-20xxxxx-bionic.bin for Bionic release.


Edit the VD database.


Connect to PSQL DB

$ psql -U vnms -h localhost   (password Versa@123)


Insert the OSSPACK to DB.(You need to change the parameters accordingly to your OSSPACK)


NOTE: Notice the -trusty for trusty-based osspack and please use -bionic for Bionic-based osspack.


Before Inserting to the DB, we make sure of the below;

1. We are updating a table named osspack_device_updates and the column arrangement is different in director versions.

2. Use the below command which will show the column wise entry

     Case 1 -> vnms=# \d osspack_device_updates;

                              Table "public.osspack_device_updates"

    Column     |            Type             | Collation | Nullable |           Default

---------------+-----------------------------+-----------+----------+-----------------------------

 package_name  | character varying(255)      |           | not null |

 product       | character varying(64)       |           | not null |

 os_version    | character varying(64)       |           | not null | 'trusty'::character varying

 update_type   | character varying(64)       |           | not null |

 version       | character varying(64)       |           | not null |

 last_version  | character varying(64)       |           |          |

 size          | bigint                      |           |          |

 percentage    | integer                     |           |          |

 check_sum     | character(64)               |           |          |

 download_time | timestamp without time zone |           |          |

 status        | character varying(100)      |           |          |

 create_date   | timestamp without time zone |           | not null |

 modify_date   | timestamp without time zone |           | not null |

 lastupdatedby | character varying(256)      |           | not null |

Indexes:

    "osspack_device_updates_pkey" PRIMARY KEY, btree (package_name)


    Case 2 -> 

3. As you can see from point 2 above, column value 'os_version' is moved to end in case2. 

4. The insert command remains the same, except the column values needs to be re-arranged. 


For flexvnf osspack:
Case 1 -->
vnms=>INSERT into osspack_device_updates values(package_name,product,os_version,update_type,version,last_version, size, percentage, check_sum, download_time, status,create_date,modify_date,lastupdatedby) values('versa-flexvnf-osspack-20230602-bionic.bin','versa-flexvnf','bionic','full','20230602',NULL,'113481769','100',NULL, to_timestamp('2023-06-07 17:06:45.334','yyyy-mm-dd hh24:mi::ss:N'), 'Download_Succeed', to_timestamp('2023-06-07 17:03:45.334','yyyy-mm-dd hh24:mi::ss:N'), to_timestamp('2023-06-07 17:06:45.334','yyyy-mm-dd hh24:mi::ss:N'),'Administrator');


NOTE: in case of bionic osspack we need to update the version, for trusty based osspack , it can be safely skipped as below.


vnms=> INSERT into osspack_device_updates values('versa-flexvnf-osspack-20230602-trusty.bin','versa-flexvnf','full','20230602',NULL,'113481769','100',NULL, to_timestamp('2023-06-07 17:06:45.334','yyyy-mm-dd hh24:mi::ss:N'), 'Download_Succeed', to_timestamp('2023-06-07 17:03:45.334','yyyy-mm-dd hh24:mi::ss:N'), to_timestamp('2023-06-07 17:06:45.334','yyyy-mm-dd hh24:mi::ss:N'),'Administrator'); 


Case 2 --> 

INSERT INTO osspack_device_updates VALUES ('versa-flexvm-osspack-20241203-bionic.bin', 'versa-flexv', 'full', '20241203', NULL, 197279862, 100, NULL, TO_TIMESTAMP('2024-12-20 05:21:46.202', 'YYYY-MM-DD HH24:MI:SS.MS'), 'Download_Success', TO_TIMESTAMP('2024-12-20 00:00:00', 'YYYY-MM-DD HH24:MI:SS'), TO_TIMESTAMP('2024-12-21 00:00:00', 'YYYY-MM-DD HH24:MI:SS'), 'Administrator', 'bionic');

For director osspack:


insert into osspack_updates values ('versa-director-osspack-20230320-bionic.bin', 'versa-director', 'bionic', 'full', '20230320', NULL, '178938877', '100', NULL, to_timestamp('2023-03-30 11:31:45.334', 'yyyy-mm-dd hh24:mi::ss:N'), NULL, 'Download_Succeed', to_timestamp('2023-03-30 11:31:45.364', 'yyyy-mm-dd hh24:mi::ss:N'), to_timestamp('2023-03-30 11:31:45.364', 'yyyy-mm-dd hh24:mi::ss:N'), 'Administrator');


Parameters:

116426163: This is equivalent to the size of the file in Bytes.

Timestamp:  You can put the time of the download.

Administrator: You can use the username.



Exit from DB.

vnms=> \q



Check in the GUI to verify whether the new OSSPACK is available or not.




There is an open enhancement Bug raised to manually upload the osspack for Appliances from the Director-GUI: 


Bug-ID: 90040

Description: Provision to manually upload the osspack for the appliance or Director when there is no internet connection for the Director.

Fix-Release: 22.1


Note: 


You can download the OSSPACK to your local system or jump server from either of the link below

https://versanetworks.app.box.com/v/osspack


https://upload.versa-networks.com/index.php/s/nEkF9xOO3e7BA9Z