After Cloud Technology: SlapOS
|
Level: |
Undergraduate / Graduate |
Duration: |
3 hours |
Technical requirements: |
IPv6 Internet connection with standard compliant webbrowser |
Contributors: |
Cédric Le Ninivin |
|
Cloud and Devops
- After Cloud Presentation
- SlapOS Architecture (Presentation)
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 /officejs/)
- 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 "officejs" 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:1d::baeb]:50005',
'git-private-url': 'https://[2001:67c:1254:e:1d::baeb]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:1d::baeb]:9686/git-public/',
'init-password': 'qtjlvsou',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86265.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86265.host.vifib.net/public/feeds&username=admin&password=qtjlvsou',
'public-url': 'https://softinst86266.host.vifib.net/public/',
'ssh-command': 'ssh slapuser1@2001:67c:1254:e:1d::baeb -p 22222',
'url': 'https://softinst86267.host.vifib.net',
'webdav-url': 'https://softinst86266.host.vifib.net/share/',
'custom-url': 'https://softinst86336.host.vifib.net/'}
NXD-Telecom.Lecture.automn-002:
{'backend-url': 'https://[2001:67c:1254:19::c4dd]:50005',
'git-private-url': 'https://[2001:67c:1254:19::c4dd]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:19::c4dd]:9686/git-public/',
'init-password': 'tczdqfnr',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86281.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86281.host.vifib.net/public/feeds&username=admin&password=tczdqfnr',
'public-url': 'https://softinst86282.host.vifib.net/public/',
'ssh-command': 'ssh slapuser23@2001:67c:1254:19::c4dd -p 22222',
'url': 'https://softinst86283.host.vifib.net',
'webdav-url': 'https://softinst86282.host.vifib.net/share/',
'custom-url': 'https://softinst86338.host.vifib.net/'}
NXD-Telecom.Lecture.automn-003:
{'backend-url': 'https://[2001:67c:1254:29::3cc]:50005',
'git-private-url': 'https://[2001:67c:1254:29::3cc]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:29::3cc]:9686/git-public/',
'init-password': 'qyzdjmvw',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86275.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86275.host.vifib.net/public/feeds&username=admin&password=qyzdjmvw',
'public-url': 'https://softinst86276.host.vifib.net/public/',
'ssh-command': 'ssh slapuser6@2001:67c:1254:29::3cc -p 22222',
'url': 'https://softinst86277.host.vifib.net',
'webdav-url': 'https://softinst86276.host.vifib.net/share/',
'custom-url': 'https://softinst86339.host.vifib.net/'}
NXD-Telecom.Lecture.automn-004:
{'backend-url': 'https://[2001:67c:1254:19::2c92]:50005',
'git-private-url': 'https://[2001:67c:1254:19::2c92]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:19::2c92]:9686/git-public/',
'init-password': 'pycjoahk',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86294.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86294.host.vifib.net/public/feeds&username=admin&password=pycjoahk',
'public-url': 'https://softinst86297.host.vifib.net/public/',
'ssh-command': 'ssh slapuser27@2001:67c:1254:19::2c92 -p 22222',
'url': 'https://softinst86298.host.vifib.net',
'webdav-url': 'https://softinst86297.host.vifib.net/share/',
'custom-url': 'https://softinst86334.host.vifib.net/'}
NXD-Telecom.Lecture.automn-005:
{'backend-url': 'https://[2001:67c:1254:e:c8::440a]:50005',
'git-private-url': 'https://[2001:67c:1254:e:c8::440a]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:c8::440a]:9686/git-public/',
'init-password': 'zgqefjpi',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86278.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86278.host.vifib.net/public/feeds&username=admin&password=zgqefjpi',
'public-url': 'https://softinst86279.host.vifib.net/public/',
'ssh-command': 'ssh slapuser0@2001:67c:1254:e:c8::440a -p 22222',
'url': 'https://softinst86280.host.vifib.net',
'webdav-url': 'https://softinst86279.host.vifib.net/share/',
'custom-url': 'https://softinst86335.host.vifib.net/'}
NXD-Telecom.Lecture.automn-006:
{'backend-url': 'https://[2001:67c:1254:e:d7::84cf]:50005',
'git-private-url': 'https://[2001:67c:1254:e:d7::84cf]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:d7::84cf]:9686/git-public/',
'init-password': 'nspmaqti',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86291.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86291.host.vifib.net/public/feeds&username=admin&password=nspmaqti',
'public-url': 'https://softinst86293.host.vifib.net/public/',
'ssh-command': 'ssh slapuser10@2001:67c:1254:e:d7::84cf -p 22222',
'url': 'https://softinst86296.host.vifib.net',
'webdav-url': 'https://softinst86293.host.vifib.net/share/',
'custom-url': 'https://softinst86340.host.vifib.net/'}
NXD-Telecom.Lecture.automn-007:
{'backend-url': 'https://[2001:67c:1254:e:86::f8bd]:50005',
'git-private-url': 'https://[2001:67c:1254:e:86::f8bd]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:86::f8bd]:9686/git-public/',
'init-password': 'eosgvbfx',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86290.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86290.host.vifib.net/public/feeds&username=admin&password=eosgvbfx',
'public-url': 'https://softinst86292.host.vifib.net/public/',
'ssh-command': 'ssh slapuser4@2001:67c:1254:e:86::f8bd -p 22222',
'url': 'https://softinst86295.host.vifib.net',
'webdav-url': 'https://softinst86292.host.vifib.net/share/',
'custom-url': 'https://softinst86333.host.vifib.net/'}
NXD-Telecom.Lecture.automn-008:
{'backend-url': 'https://[2001:67c:1254:e:86::4566]:50005',
'git-private-url': 'https://[2001:67c:1254:e:86::4566]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:86::4566]:9686/git-public/',
'init-password': 'jtiwkrah',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86299.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86299.host.vifib.net/public/feeds&username=admin&password=jtiwkrah',
'public-url': 'https://softinst86300.host.vifib.net/public/',
'ssh-command': 'ssh slapuser3@2001:67c:1254:e:86::4566 -p 22222',
'url': 'https://softinst86301.host.vifib.net',
'webdav-url': 'https://softinst86300.host.vifib.net/share/',
'custom-url': 'https://softinst86332.host.vifib.net/'}
NXD-Telecom.Lecture.automn-009
{'backend-url': 'https://[2001:67c:1254:e:c1::5aa1]:50005',
'git-private-url': 'https://[2001:67c:1254:e:c1::5aa1]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:c1::5aa1]:9686/git-public/',
'init-password': 'gxurdpzi',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86287.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86287.host.vifib.net/public/feeds&username=admin&password=gxurdpzi',
'public-url': 'https://softinst86288.host.vifib.net/public/',
'ssh-command': 'ssh slapuser10@2001:67c:1254:e:c1::5aa1 -p 22222',
'url': 'https://softinst86289.host.vifib.net',
'webdav-url': 'https://softinst86288.host.vifib.net/share/',
'custom-url': 'https://softinst86331.host.vifib.net/'}
NXD-Telecom.Lecture.automn-0010
{'backend-url': 'https://[2001:67c:1254:e:63::d1ab]:50005',
'git-private-url': 'https://[2001:67c:1254:e:63::d1ab]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:63::d1ab]:9686/git-public/',
'init-password': 'rhmqfkxy',
'init-user': 'admin',
'monitor-base-url': 'https://softinst86284.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url=https://softinst86284.host.vifib.net/public/feeds&username=admin&password=rhmqfkxy',
'public-url': 'https://softinst86285.host.vifib.net/public/',
'ssh-command': 'ssh slapuser1@2001:67c:1254:e:63::d1ab -p 22222',
'url': 'https://softinst86286.host.vifib.net',
'webdav-url': 'https://softinst86285.host.vifib.net/share/',
'custom-url': 'https://softinst86337.host.vifib.net/'}