Updated: Pushed version-05 of – Creating A DevOps Like Environment In Oracle Solaris

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

I just pushed version-05 of – Creating A DevOps Like Environment In Oracle Solaris

Below are the details of this update, for the code and full detail please check out the git repository here.

Version 0.5

Added: This version adds the VM/Zone image rotate i.e. -r (–rotateImg) option.

With this version you can now update/rollback an image using the newest ZFS copy.

For example:

z-12345-jir1 was created on 10/1


z-12345-jir2 was created on 10/2


z-12345-jir3 was created on 10/3

If you remove z-12345-jir2 all changes/updates consume disk space eve it was deleted, it will only be freed if z-12345-jir1 will be removed which is still in use.

To get around this issue.

You can use the option -r which will clone/create a new zfs file system in z-12345-jir1 with the prefix of _clone.

Next, it will copy by using rsync –delete to back-date the clone with the original content.

Finlay, it will switch / rename mount points and snaps.

Note: Currently the original image / snap will only be renamed with a time stamp and original name,
if all checks out to be good you manually deleted the image, once this functionally is fully tested I will add to auto delete the old original image/snap.

Updated: With this updated the VM/Zone deleted option was also updated.

Since you can now have multiple snaps/clones for the same VM/zone.

If you use the -d option the system will remove the VM/zone as well as all associated snaps/clones.

Updated: Created new directory cloneFiles/conf and cloneFiles/bin, all executable files ware moved to bin and all xml ware moved to conf, the xml files ware updated with the new file path.

Updated: Added a service for rsync application/apps1_mount:apps1sync, it will look like the below.

disabled       11:40:15 svc:/application/apps1_mount:apps1sync
disabled       11:40:15 svc:/application/apps1_mount:apps1dst
disabled       11:40:15 svc:/application/apps1_mount:apps1src

Rotaing a zone.

./clone_zfs.py -r -i jir111
Rotating /apps1(apps1_z-1540500938-jir111) in zone z-1540500938-jir111.. please wait...
Rotation of /apps1(apps1_z-1540500938-jir111) in zone z-1540500938-jir111 completed successfully.

Log output – rotaing a zone.

2018-10-26 10:18:45,588:z-1540563400-jir11:INFO: Validating VM/Zone status.. please wait...
2018-10-26 10:18:46,054:z-1540563400-jir11:INFO: Rotating /apps1(apps1_z-1540563400-jir11) in zone z-1540563400-jir11...
2018-10-26 10:18:46,058:z-1540563400-jir11:INFO: Verifying VM/Zone z-1540563400-jir11 RAD connection availability.
2018-10-26 10:18:46,237:z-1540563400-jir11:INFO: RAD server is accessible.
2018-10-26 10:18:46,277:z-1540563400-jir11:INFO: Cerating snapshot: snap_z-1540563525-jir11
2018-10-26 10:18:46,876:z-1540563400-jir11:INFO: Snapshot created successfully.
2018-10-26 10:18:46,877:z-1540563400-jir11:INFO: CLONING file-systems
2018-10-26 10:18:46,877:z-1540563400-jir11:INFO: Source: /apps1
2018-10-26 10:18:46,877:z-1540563400-jir11:INFO: Destination: apps1_z-1540563525-jir11
2018-10-26 10:18:46,877:z-1540563400-jir11:INFO: Please wait...
2018-10-26 10:18:49,593:z-1540563400-jir11:INFO: Successfully created clone apps1_z-1540563525-jir11
2018-10-26 10:18:49,593:z-1540563400-jir11:INFO: Setting apps1_z-1540563525-jir11 as /apps1_clone.
2018-10-26 10:18:49,621:z-1540563400-jir11:INFO: Successfully set apps1_z-1540563525-jir11 as /apps1_clone mount.
2018-10-26 10:18:49,623:z-1540563400-jir11:INFO: Enabling service related to mount apps1_z-1540563525-jir11, in zone z-1540563400-jir11.
2018-10-26 10:18:49,644:z-1540563400-jir11:INFO: Service enabled for apps1_z-1540563525-jir11 mount. successful.
2018-10-26 10:18:49,646:z-1540563400-jir11:INFO: Enabling service related to mount rsync, in zone z-1540563400-jir11.
2018-10-26 10:18:49,667:z-1540563400-jir11:INFO: Service enabled for rsync mount. successful.
2018-10-26 10:18:50,685:z-1540563400-jir11:INFO: Disableing service related to mount NA in zone z-1540563400-jir11.
2018-10-26 10:18:50,705:z-1540563400-jir11:INFO: Service enabled for NA mount successful.
2018-10-26 10:18:50,706:z-1540563400-jir11:INFO: Sync to /apps1_clone(apps1_z-1540563525-jir11) completed sucssfuly.
2018-10-26 10:18:50,708:z-1540563400-jir11:INFO: Disableing service related to mount rsync in zone z-1540563400-jir11.
2018-10-26 10:18:50,720:z-1540563400-jir11:INFO: Service enabled for rsync mount successful.
2018-10-26 10:18:50,721:z-1540563400-jir11:INFO: Disableing service related to mount apps1_z-1540563525-jir11 in zone z-1540563400-jir11.
2018-10-26 10:18:50,737:z-1540563400-jir11:INFO: Service enabled for apps1_z-1540563525-jir11 mount successful.
2018-10-26 10:18:50,738:z-1540563400-jir11:INFO: Disableing service related to mount apps1_z-1540563400-jir11 in zone z-1540563400-jir11.
2018-10-26 10:18:50,757:z-1540563400-jir11:INFO: Service enabled for apps1_z-1540563400-jir11 mount successful.
2018-10-26 10:18:50,757:z-1540563400-jir11:INFO: Renaming snap: from snap_z-1540563400-jir11 to snap_z-1540563400-jir11.
2018-10-26 10:18:51,504:z-1540563400-jir11:INFO: Renaming clone: from apps1_z-1540563400-jir11 to apps1_z-1540563400-jir11.
2018-10-26 10:18:53,847:z-1540563400-jir11:INFO: Renaming snap: from snap_z-1540563525-jir11 to snap_z-1540563525-jir11.
2018-10-26 10:18:54,515:z-1540563400-jir11:INFO: Renaming clone: from apps1_z-1540563525-jir11 to apps1_z-1540563525-jir11.
2018-10-26 10:18:57,042:z-1540563400-jir11:INFO: Enabling service related to mount apps1_z-1540563400-jir11, in zone z-1540563400-jir11.
2018-10-26 10:18:57,058:z-1540563400-jir11:INFO: Service enabled for apps1_z-1540563400-jir11 mount. successful.
2018-10-26 10:18:57,058:z-1540563400-jir11:INFO: Rotation of /apps1(apps1_z-1540563400-jir11) in zone z-1540563400-jir11 completed successfully.

For a batter explanation you can check out Part 1 and Part 2 on how Creating A DevOps Like Environment In Oracle Solaris.

You might also like – Articles related to Oracle Solaris 11.4/Solaris 12.

Like what you’re reading? please provide feedback, any feedback is appreciated.

Leave a Reply

Notify of