After Cloud Technology: SlapOS
|
Level: |
Undergraduate / Graduate |
Duration: |
3 hours |
Technical requirements: |
IPv6 Internet connection with standard compliant webbrowser |
Contributors: |
Cédric Le Ninivin (cedric (dot) leninivin (at) nexedi (dot) com)
Thomas Gambier (thomas (dot) gambier (at) nexedi (dot) com) |
|
Cloud and Devops
- After Cloud Presentation
- SlapOS Architecture (Presentation)
- SlapOS HomePage
Devops with Web Runner
- Connect to your runner:
- Select the software to use:
- Click on the home button
- Click "Open Software Release"
- Select "html5as" in "software" in "slapos"
- Click "Open Software"
- The profile of your software should open
- Press Build and Run Button (Play button)
- Add parameter: download_url = https://softinst51206.host.vifib.net/public/bookmark.tgz
- Check the logs, there is an error, a parameter is missing
- go on "Services" tab
- in "Services" tab go in "Parameters" tab
- click "new"
- add the value: download_url = https://softinst51206.host.vifib.net/public/bookmark.tgz
- Run your instance
- Check no error are left
- On the service tab, get Connection Information and access your website (if needed add /bookmark/)
- On the service tab, see running process
- "Downloader" process is in charge of downloading the provided file
- "Launcher" is NGINX a server web (if you click on "RUNNING", it will stop your service, you won't be able to access your website anymore )
- Change the default nginx directory
- Manually
- Go in "editor" tab: Documentation here
- Use the "switch" to be in "Working Dir"
- You'll now see your full folder tree. Explanation here: Folder Hierarchy
- go to "instance/slappart0/etc" and select "nginx.conf"
- Add "bookmark" at the end of the root folder to automatically use the downloaded folder
- The change is not applied yet, you need to restart
- Restart "slappart0:launcher" (nginx) from "Service" tab in "Process" tab
- Test it works
- This way is bad. Everything has been done manually, it'll need to be done again each time you deploy this site
- Devops, We will automate our actions with SlapOS
- What action has been taken?
- Set the directory as a parameter of the instance (just like download_url)
- Go in "editor" tab
- Use the "switch" to be in "This project"
- Your software is defined in "software/html5as"
- instance_html5as.cfg is used to configure the instance, templates/nginx_conf.in is used as a template to generate the configuration
- Find where the root path is defined and add a parameter to it. See how it has been made here: https://lab.nexedi.com/cedric.leninivin/slapos/commit/fda026ef0fc083b58d960148655a9355fa58eea6
- Trigger "build and run"
- If you get a md5sum error update it using "Get Or update md5sum"
- Add the parameter in services and trigger build and run
- Check Nginx configuration
- Restart
- Do not restart services, it generates downtime. Use graceful restart
- Look on the internet to know how to do graceful restart with Nginx, it should be a signal
- Now use it on your current Nginx to test its efficiency
- Look at how it is done in apache-frontend software release: https://lab.nexedi.com/nexedi/slapos/blob/master/software/apache-frontend/instance-apache-frontend.cfg
- Start adding it to your software release in a similar way as this one: https://lab.nexedi.com/cedric.leninivin/slapos/commit/4797489c3a5a86dcf080ae18397b2239685019ba
- Make it work 😀
- Have an instance request another instance.
- The first step of making a CDN:
- In a CDN, the "root" instances receives all the parameters and send them to other instances running the actual frontend
- First define a new software type in instance.cfg
- Then add a new template for this software type
- Fill the template to request an instance
- You can get more information here: https://lab.nexedi.com/cedric.leninivin/slapos/commit/de140f52e0699b57b8f510a1e9efcc9ad3005562
- Exercice:
- Have your replicate instance request 2 instances
- There is a conflict of port (both nginx instances are using the same port)
- Add a parameter to the default instance the port number to use following the same idea as the default path.
- Extra: Add a promise to check you can correctly access your website.
HTML5 et jIO c'est sympa
- Présentation: P-OJS-Shenzen
- Documentation: jio.readthedocs.io
Extra links
contact: Cédric Le Ninivin, cedric.leninivin@nexedi.com
Accès aux Instances
NXD-Telecom.Lecture.automn-001
{'backend-url': 'https://[2001:67c:1254:e:8c::a6b1]:50005',
'git-private-url': 'https://[2001:67c:1254:e:8c::a6b1]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:8c::a6b1]:9686/git-public/',
'init-password': 'yqkfixzb',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107709.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107709.host.vifib.net/public/feeds&username=admin&password=yqkfixzb',
'public-url': 'https://softinst107710.host.vifib.net/public/',
'ssh-command': 'ssh slapuser7@2001:67c:1254:e:8c::a6b1 -p 22222',
'url': 'https://softinst107711.host.vifib.net',
'webdav-url': 'https://softinst107710.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-002
{'backend-url': 'https://[2001:67c:1254:e:3::a8ab]:50005',
'git-private-url': 'https://[2001:67c:1254:e:3::a8ab]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:3::a8ab]:9686/git-public/',
'init-password': 'cslfpuky',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107704.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107704.host.vifib.net/public/feeds&username=admin&password=cslfpuky',
'public-url': 'https://softinst107706.host.vifib.net/public/',
'ssh-command': 'ssh slapuser18@2001:67c:1254:e:3::a8ab -p 22222',
'url': 'https://softinst107708.host.vifib.net',
'webdav-url': 'https://softinst107706.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-003
{'backend-url': 'https://[2001:67c:1254:e:3::2f97]:50005',
'git-private-url': 'https://[2001:67c:1254:e:3::2f97]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:3::2f97]:9686/git-public/',
'init-password': 'itmenfwj',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107712.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107712.host.vifib.net/public/feeds&username=admin&password=itmenfwj',
'public-url': 'https://softinst107713.host.vifib.net/public/',
'ssh-command': 'ssh slapuser2@2001:67c:1254:e:3::2f97 -p 22222',
'url': 'https://softinst107714.host.vifib.net',
'webdav-url': 'https://softinst107713.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-004
{'backend-url': 'https://[2001:67c:1254:e:14::6a08]:50005',
'git-private-url': 'https://[2001:67c:1254:e:14::6a08]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:14::6a08]:9686/git-public/',
'init-password': 'zybkhqur',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107703.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107703.host.vifib.net/public/feeds&username=admin&password=zybkhqur',
'public-url': 'https://softinst107705.host.vifib.net/public/',
'ssh-command': 'ssh slapuser18@2001:67c:1254:e:14::6a08 -p 22222',
'url': 'https://softinst107707.host.vifib.net',
'webdav-url': 'https://softinst107705.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-005
{'backend-url': 'https://[2001:67c:1254:e:18::78d3]:50005',
'git-private-url': 'https://[2001:67c:1254:e:18::78d3]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:18::78d3]:9686/git-public/',
'init-password': 'ckvpjwqt',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107686.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107686.host.vifib.net/public/feeds&username=admin&password=ckvpjwqt',
'public-url': 'https://softinst107689.host.vifib.net/public/',
'ssh-command': 'ssh slapuser3@2001:67c:1254:e:18::78d3 -p 22222',
'url': 'https://softinst107700.host.vifib.net',
'webdav-url': 'https://softinst107689.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-006
{'backend-url': 'https://[2001:67c:1254:e:8c::20c7]:50005',
'git-private-url': 'https://[2001:67c:1254:e:8c::20c7]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:8c::20c7]:9686/git-public/',
'init-password': 'synrhklj',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107694.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107694.host.vifib.net/public/feeds&username=admin&password=synrhklj',
'public-url': 'https://softinst107699.host.vifib.net/public/',
'ssh-command': 'ssh slapuser17@2001:67c:1254:e:8c::20c7 -p 22222',
'url': 'https://softinst107702.host.vifib.net',
'webdav-url': 'https://softinst107699.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-007
{'backend-url': 'https://[2001:67c:1254:e:c6::aa0b]:50005',
'git-private-url': 'https://[2001:67c:1254:e:c6::aa0b]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:c6::aa0b]:9686/git-public/',
'init-password': 'zqkltjed',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107721.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107721.host.vifib.net/public/feeds&username=admin&password=zqkltjed',
'public-url': 'https://softinst107722.host.vifib.net/public/',
'ssh-command': 'ssh slapuser11@2001:67c:1254:e:c6::aa0b -p 22222',
'url': 'https://softinst107723.host.vifib.net',
'webdav-url': 'https://softinst107722.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-008
{'backend-url': 'https://[2001:67c:1254:89::ce40]:50005',
'git-private-url': 'https://[2001:67c:1254:89::ce40]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:89::ce40]:9686/git-public/',
'init-password': 'qgkuohdp',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107685.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107685.host.vifib.net/public/feeds&username=admin&password=qgkuohdp',
'public-url': 'https://softinst107688.host.vifib.net/public/',
'ssh-command': 'ssh slapuser9@2001:67c:1254:89::ce40 -p 22222',
'url': 'https://softinst107698.host.vifib.net',
'webdav-url': 'https://softinst107688.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-009
{'backend-url': 'https://[2001:67c:1254:e:c6::9d77]:50005',
'git-private-url': 'https://[2001:67c:1254:e:c6::9d77]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:c6::9d77]:9686/git-public/',
'init-password': 'aqodpwsm',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107715.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107715.host.vifib.net/public/feeds&username=admin&password=aqodpwsm',
'public-url': 'https://softinst107716.host.vifib.net/public/',
'ssh-command': 'ssh slapuser4@2001:67c:1254:e:c6::9d77 -p 22222',
'url': 'https://softinst107717.host.vifib.net',
'webdav-url': 'https://softinst107716.host.vifib.net/share/'}
NXD-Telecom.Lecture.automn-0010
{'backend-url': 'https://[2001:67c:1254:e:3::3c4e]:50005',
'git-private-url': 'https://[2001:67c:1254:e:3::3c4e]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:3::3c4e]:9686/git-public/',
'init-password': 'tnkdegsl',
'init-user': 'admin',
'monitor-base-url': 'https://softinst107718.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst107718.host.vifib.net/public/feeds&username=admin&password=tnkdegsl',
'public-url': 'https://softinst107719.host.vifib.net/public/',
'ssh-command': 'ssh slapuser11@2001:67c:1254:e:3::3c4e -p 22222',
'url': 'https://softinst107720.host.vifib.net',
'webdav-url': 'https://softinst107719.host.vifib.net/share/'}