BeyondTheClouds / enos

Experimental eNvironment for OpenStack :monkey:
https://beyondtheclouds.github.io/enos/
GNU General Public License v3.0
30 stars 22 forks source link

EnOS Tutorial on top of Grid'5000 #289

Closed rcherrueau closed 6 years ago

rcherrueau commented 6 years ago

Tutorial is index.org. It is an org mode file written to:

To export, clean line refs, and tangle code execute the following elisp code.

,----
| (org-babel-tangle)
| (load-file "~/.emacs.d/private/ox-rst.el")
| (require 'ox-rst)
| (org-rst-export-to-rst)
| (find-file "index.rst")
| (with-current-buffer "index.rst"
|   (goto-char (point-min))
|   (while (re-search-forward "(ref:.+?)" nil t)
|     (replace-match ""))
|   (save-buffer))
`----

See *Appendix > ** How to export this tutorial

rcherrueau commented 6 years ago

I added a commit to prepare the next version of the TP. I bet for stable/rocky and pip install "enos[openstack]==5.0.0. And I added an Emacs function to automatically update the TP. See my commit message.

To update the TP when a new version of EnOS appears, change in the
following the values of `new-os-version' and `new-enos-install' with the
value of the next release. Then executes the code with `C-c C-c'.

See * Appendix > ** Update with a new version of EnOS

,----
| (let ((cur-os-version "stable/rocky")
|       (new-os-version "stable/rocky")
|       (cur-enos-install "pip install \"enos[openstack]==5.0.0\"")
|       (new-enos-install "pip install \"enos[openstack]==5.0.0\""))
|   (defun enos/update-tuto (cur-version new-version)
|     (with-current-buffer (current-buffer)
|       (goto-char (point-min))
|       (while (search-forward cur-version nil t)
|         (replace-match new-version))
|       (save-buffer)))
|   (enos/update-tuto cur-os-version new-os-version)
|   (enos/update-tuto cur-enos-install new-enos-install))
`----