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://softinst81476.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://softinst81476.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.cg 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/blob/a2399966a9c7b91c561394d6ac58fb6d172bd4d1/software/html5as/instance_html5as.cfg
- 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/b35fc239b7ef5e52179aacfe9a022959c9b3c90d
- 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/bdfaecc228de9633a4261560b5062920cacd0493
- 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-001
{'backend-url': 'https://[2001:67c:1254:e:86::8c8c]:50005',
'git-private-url': 'https://[2001:67c:1254:e:86::8c8c]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:86::8c8c]:9686/git-public/',
'init-password': 'oqsanfck',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81475.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81475.host.vifib.net/public/feeds&username;=admin&password;=oqsanfck',
'public-url': 'https://softinst81476.host.vifib.net/public/',
'ssh-command': 'ssh slapuser5@2001:67c:1254:e:86::8c8c -p 22222',
'url': 'https://softinst81477.host.vifib.net',
'webdav-url': 'https://softinst81476.host.vifib.net/share/'}
NXD-Telecom.Lecture-002
{'backend-url': 'https://[2001:67c:1254:e:ae::a951]:50005',
'git-private-url': 'https://[2001:67c:1254:e:ae::a951]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:ae::a951]:9686/git-public/',
'init-password': 'geunozka',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81479.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81479.host.vifib.net/public/feeds&username;=admin&password;=geunozka',
'public-url': 'https://softinst81480.host.vifib.net/public/',
'ssh-command': 'ssh slapuser8@2001:67c:1254:e:ae::a951 -p 22222',
'url': 'https://softinst81481.host.vifib.net',
'webdav-url': 'https://softinst81480.host.vifib.net/share/',
'ipv4': 'https://softinst81511.host.vifib.net'}
NXD-Telecom.Lecture-003
{'backend-url': 'https://[2001:67c:1254:e:ab::8117]:50005',
'git-private-url': 'https://[2001:67c:1254:e:ab::8117]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:ab::8117]:9686/git-public/',
'init-password': 'switlkbe',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81489.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81489.host.vifib.net/public/feeds&username;=admin&password;=switlkbe',
'public-url': 'https://softinst81490.host.vifib.net/public/',
'ssh-command': 'ssh slapuser28@2001:67c:1254:e:ab::8117 -p 22222',
'url': 'https://softinst81491.host.vifib.net',
'webdav-url': 'https://softinst81490.host.vifib.net/share/',
'ipv4': 'https://softinst81513.host.vifib.net/'}
NXD-Telecom.Lecture-004
{'backend-url': 'https://[2001:67c:1254:e:ab::de57]:50005',
'git-private-url': 'https://[2001:67c:1254:e:ab::de57]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:ab::de57]:9686/git-public/',
'init-password': 'zhmeyqcv',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81493.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81493.host.vifib.net/public/feeds&username;=admin&password;=zhmeyqcv',
'public-url': 'https://softinst81495.host.vifib.net/public/',
'ssh-command': 'ssh slapuser113@2001:67c:1254:e:ab::de57 -p 22222',
'url': 'https://softinst81496.host.vifib.net',
'webdav-url': 'https://softinst81495.host.vifib.net/share/',
'ipv4': 'https://softinst81514.host.vifib.net/'}
NXD-Telecom.Lecture-005
{'backend-url': 'https://[2001:67c:1254:e:45::f6dd]:50005',
'git-private-url': 'https://[2001:67c:1254:e:45::f6dd]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:45::f6dd]:9686/git-public/',
'init-password': 'ifvcslym',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81492.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81492.host.vifib.net/public/feeds&username;=admin&password;=ifvcslym',
'public-url': 'https://softinst81494.host.vifib.net/public/',
'ssh-command': 'ssh slapuser1@2001:67c:1254:e:45::f6dd -p 22222',
'url': 'https://softinst81497.host.vifib.net',
'webdav-url': 'https://softinst81494.host.vifib.net/share/',
'ipv4': 'https://softinst81519.host.vifib.net/'}
NXD-Telecom.Lecture-006
{'backend-url': 'https://[2001:67c:1254:e:ab::e44a]:50005',
'git-private-url': 'https://[2001:67c:1254:e:ab::e44a]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:e:ab::e44a]:9686/git-public/',
'init-password': 'prkilohn',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81508.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81508.host.vifib.net/public/feeds&username;=admin&password;=prkilohn',
'public-url': 'https://softinst81509.host.vifib.net/public/',
'ssh-command': 'ssh slapuser112@2001:67c:1254:e:ab::e44a -p 22222',
'url': 'https://softinst81510.host.vifib.net',
'webdav-url': 'https://softinst81509.host.vifib.net/share/',
'ipv4': 'https://softinst81518.host.vifib.net/'}
NXD-Telecom.Lecture-007
{'backend-url': 'https://[2001:67c:1254:19::173f]:50005',
'git-private-url': 'https://[2001:67c:1254:19::173f]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:19::173f]:9686/git-public/',
'init-password': 'cflmvuwz',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81505.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81505.host.vifib.net/public/feeds&username;=admin&password;=cflmvuwz',
'public-url': 'https://softinst81506.host.vifib.net/public/',
'ssh-command': 'ssh slapuser26@2001:67c:1254:19::173f -p 22222',
'url': 'https://softinst81507.host.vifib.net',
'webdav-url': 'https://softinst81506.host.vifib.net/share/',
'ipv4': 'https://softinst81517.host.vifib.net/'}
NXD-Telecom.Lecture-008
{'backend-url': 'https://[2001:67c:1254:19::2dd7]:50005',
'git-private-url': 'https://[2001:67c:1254:19::2dd7]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:19::2dd7]:9686/git-public/',
'init-password': 'dxrcziva',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81501.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81501.host.vifib.net/public/feeds&username;=admin&password;=dxrcziva',
'public-url': 'https://softinst81503.host.vifib.net/public/',
'ssh-command': 'ssh slapuser28@2001:67c:1254:19::2dd7 -p 22222',
'url': 'https://softinst81504.host.vifib.net',
'webdav-url': 'https://softinst81503.host.vifib.net/share/'
'ipv4': 'https://softinst81515.host.vifib.net/'}
NXD-Telecom.Lecture-009
{'backend-url': 'https://[2001:67c:1254:30::c57]:50005',
'git-private-url': 'https://[2001:67c:1254:30::c57]:9686/git/',
'git-public-url': 'https://[2001:67c:1254:30::c57]:9686/git-public/',
'init-password': 'djyhfkcg',
'init-user': 'admin',
'monitor-base-url': 'https://softinst81498.host.vifib.net',
'monitor-setup-url': 'https://monitor.app.officejs.com/#page=settings_configurator&url;=https://softinst81498.host.vifib.net/public/feeds&username;=admin&password;=djyhfkcg',
'public-url': 'https://softinst81500.host.vifib.net/public/',
'ssh-command': 'ssh slapuser20@2001:67c:1254:30::c57 -p 22222',
'url': 'https://softinst81502.host.vifib.net',
'webdav-url': 'https://softinst81500.host.vifib.net/share/',
'url': 'https://softinst81516.host.vifib.net/'
'ipv4': 'https://softinst81516.host.vifib.net/'}