Update everything, add scaleway password reset

This commit is contained in:
Vladan Popovic 2019-08-11 12:21:15 +02:00
parent be2d382c0b
commit d4fd928577
6 changed files with 95 additions and 42 deletions

View File

@ -16,15 +16,15 @@
letter-spacing: 0px; letter-spacing: 0px;
} }
.yue p {
hyphens: none;
}
.t-sidebar { .t-sidebar {
background: #111111; background: #111111;
font-size: 0.8em; font-size: 0.8em;
} }
.t-sidebar .inner {
width: auto;
}
.yue pre { .yue pre {
font-family: andale; font-family: andale;
} }
@ -69,3 +69,8 @@ a.atom {
width: 30px; width: 30px;
font-family: andale; font-family: andale;
} }
div.t-content > div.t-body > div.section:last-child {
color:#9a9a9a;
margin-top: 40px;
}

View File

@ -4,26 +4,24 @@
:author: vladan :author: vladan
:location: Belgrade :location: Belgrade
=========================== =========================
AutomaticCRM Ubuntu Desktop Custom Ubuntu Desktop ISO
=========================== =========================
Below are the steps taken to create the Ubuntu 18.04.2 installer for the needs Last week I got a task to create an Ubuntu ISO installer that should install
of AutomaticCRM according to the requirements ... everything automatically, plus some other requirements listed below. This post
contains the steps taken to create the Ubuntu 18.04.2 installer according to
these requirements ...
Operating system * `Only one domain is allowed`_
* `No print screen functionality`_
* Only one domain is allowed ( dev.automaticcrm.ai ) in network adapter * `No usb memory functionality`_
* No print screen functionality * `No access to the filesystem`_
* No usb memory functionality * `No apps except browser`_
* No access to the filesystem
* No apps except browser
Set up the build environment
Steps to set up the build environment ============================
=====================================
.. code-block:: bash .. code-block:: bash
@ -35,15 +33,23 @@ Steps to set up the build environment
Set up the rootfs Set up the rootfs
================= =================
Create an nspawn container from the rootfs.
.. code-block:: bash .. code-block:: bash
unsquashfs disk/casper/filesystem.squashfs unsquashfs disk/casper/filesystem.squashfs
sudo systemd-nspawn \ sudo systemd-nspawn \
--directory squashfs-root/ \ --directory squashfs-root/ \
--bind ~/dev/automaticcrm/deb:/opt/deb --bind ~/dev/automaticcrm/deb:/opt/deb \
--bind /etc/resolv.conf /bin/bash --bind /etc/resolv.conf /bin/bash
Once in the shell, run these commands: No print screen functionality
-----------------------------
... and other unneeded software.
Once in the shell, run these commands to remove some extra software and install
Chrome.
.. code-block:: bash .. code-block:: bash
@ -67,9 +73,8 @@ Once in the shell, run these commands:
dpkg -i /opt/deb/google-chrome-stable_current_amd64.deb dpkg -i /opt/deb/google-chrome-stable_current_amd64.deb
Only one domain is allowed
Restrict domains --------------------------
================
To redirect all domains to localhost, except dev.automaticcrm.ai, create the To redirect all domains to localhost, except dev.automaticcrm.ai, create the
file ``/etc/dnsmasq.d/autocrm.conf`` with these lines: file ``/etc/dnsmasq.d/autocrm.conf`` with these lines:
@ -77,7 +82,7 @@ file ``/etc/dnsmasq.d/autocrm.conf`` with these lines:
.. code-block:: ini .. code-block:: ini
address=/#/127.0.0.1 address=/#/127.0.0.1
server=/dev.automaticcrm.ai/8.8.8.8 server=/DOMAIN/8.8.8.8
Add this line to /etc/dnsmasq.conf Add this line to /etc/dnsmasq.conf
@ -85,9 +90,15 @@ Add this line to /etc/dnsmasq.conf
conf-dir=/etc/dnsmasq.d conf-dir=/etc/dnsmasq.d
No usb memory functionality
---------------------------
Run Chrome ONLY .. code-block:: bash
===============
printf "nblacklist uas\nblacklist usb_storage\n" >> /etc/modprobe.d/blacklist.conf
No apps except browser
----------------------
Override the path for all users. Override the path for all users.
@ -99,7 +110,7 @@ Chrome in fullscreen mode:
[Desktop Entry] [Desktop Entry]
Name=Ubuntu Name=Ubuntu
Comment=This session logs you into Ubuntu Comment=This session logs you into Ubuntu
Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/google-chrome --kiosk https://dev.automaticcrm.ai Exec=env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/google-chrome --kiosk https://DOMAIN
Type=Application Type=Application
DesktopNames=ubuntu:AutomaticCRM DesktopNames=ubuntu:AutomaticCRM
X-Ubuntu-Gettext-Domain=gnome-session-3.0 X-Ubuntu-Gettext-Domain=gnome-session-3.0
@ -109,13 +120,11 @@ Chrome in fullscreen mode:
If you want to change the domain, edit this file and also enable it in the If you want to change the domain, edit this file and also enable it in the
dnsmqsq config above. dnsmqsq config above.
Remove USB drivers No access to the filesystem
================== ---------------------------
.. code-block:: bash
printf "\n#AutomaticCRM disabled modules\nblacklist uas\nblacklist usb_storage\n" >> /etc/modprobe.d/blacklist.conf
Chrome opens in kiosk mode right after login, so there's no access to anything
whatsoever.
Create the ISO Create the ISO
============== ==============
@ -145,6 +154,7 @@ Recreate installation files and pack the ISO.
-boot-info-table \ -boot-info-table \
-o automaticcrm-ubuntu-18.04.2.iso livecd/ -o automaticcrm-ubuntu-18.04.2.iso livecd/
Test the installation in a vm Test the installation in a vm
============================= =============================

View File

@ -0,0 +1,33 @@
.. post:: 2019.08.11
:tags: howto,scaleway,hosting,password
:category: hosting
:author: vladan
:location: Belgrade
===============================
Reset lost password on Scaleway
===============================
`These are the supported boot options
<https://github.com/scaleway/initrd/tree/master/Linux#boot-options>`_ on
Scaleway, managed through instance tags.
The [serial] console doesn't work with Firefox, so install Chromium.
.. important::
Use bootscript for this, not local boot.
Instances -> Select Your Instance -> Advanced Settings.
Make sure only ``INITRD_POST_SHELL=1`` is present in tags.
Reboot instance. You'll get a shell with the volume mounted in ``/newroot``.
.. code-block:: bash
chroot /newroot
passwd root
Exit the chroot shell and the post initrd shell, the boot should continue to
the VM.

View File

@ -16,9 +16,9 @@
# -- Project information ----------------------------------------------------- # -- Project information -----------------------------------------------------
project = 'dev notes' copyright = "No Rights Reserved"
copyright = 'No Rights Reserved' author = "Vladan Popovic"
author = 'Vladan Popovic' project = author + "'s notes"
# -- General configuration --------------------------------------------------- # -- General configuration ---------------------------------------------------
@ -50,6 +50,7 @@ html_theme = 'sphinx_typlog_theme'
import sphinx_typlog_theme import sphinx_typlog_theme
html_theme_path = [sphinx_typlog_theme.get_path()] html_theme_path = [sphinx_typlog_theme.get_path()]
pygments_style = 'default' pygments_style = 'default'
html_title = project
# Add any paths that contain custom static files (such as style sheets) here, # Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files, # relative to this directory. They are copied after the builtin static files,
@ -63,13 +64,17 @@ html_sidebars = {
'localtoc.html', 'localtoc.html',
'relations.html', 'relations.html',
'searchbox.html', 'searchbox.html',
'sourcelink.html',
'atom.html', 'atom.html',
'recentposts.html',
'categories.html',
'archives.html',
] ]
} }
# Blog (ablog) config # Blog (ablog) config
blog_authors = { blog_authors = {
'vladan': ('Vladan Popovic', 'https://dev.vp.mk'), 'vladan': ('Vladan Popovic', 'https://notes.vp.mk'),
} }
blog_languages = { blog_languages = {
'en': ('English', None), 'en': ('English', None),

View File

@ -12,8 +12,8 @@ Recent posts
.. postlist:: 5 .. postlist:: 5
:author: vladan :author: vladan
:date: %A, %B %d, %Y :date: %A, %d.%m.%Y
:format: {title} by {author} on {date} :format: {title} by {author} on {date}
:list-style: circle :list-style: disk
:excerpts: :excerpts:
:sort: :sort:

View File

@ -9,7 +9,7 @@ deps =
sphinx-typlog-theme sphinx-typlog-theme
ablog ablog
commands = commands =
sphinx-autobuild -b html source/ build/html/ sphinx-autobuild -E -b html source/ build/html/
[testenv:cv] [testenv:cv]
whitelist_externals = /usr/bin/pandoc whitelist_externals = /usr/bin/pandoc