Concept "Easy System Cloning (DSESC)"

From SMW CindyKate by dataspects
Component0272684347
Jump to navigation Jump to search
[edit]
Keywords/Contexts

DSESC · Backup · Restore · Clone

Annotations
{{#compound_query:Component0272684347Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.UseCaseMotivation;?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning
Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.Concept "Easy System Cloning (DSESC)";?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning Property "-Has subobject" has a restricted application area and cannot be used as annotation property by a user.Concept "Easy System Cloning (DSESC)";?HasDirection;?IsMotivating;?IsMotivatedBy;?HasReasoning
name=MotivationsDeclaredOnThisPageResultItem|link=none}}
Motivations
Lua error in Module:Motivations at line 23: attempt to concatenate field 'hasReasoning' (a nil value).
[edit]

Content

HasMarketingPage "HasMarketingPage</br>" contains a listed "LF" character as part of the property label and has therefore been classified as invalid.

Background and Reasoning

Essentially Easy System Cloning is a

  • encrypted,
  • scheduled/ad hoc,
  • full/incremental,
  • local/offsite

Duplicity backup solution. See https://dataspects.com/easy-system-cloning.

How is this concept implemented?

Set up EasySystemCloning (DSESC) Backup on system servers

Set up EasySystemCloning (DSESC) Restore on computers that shall be able to clone/restore the system

Old: Component 998880

A system is cloned by user@workstation:/home/user/clone_my_system$ vagrant up. This requires your workstation to have the following software installed:

This functionality is based on /home/user/clone_my_system/Vagrantfile. This Vagrantfile specifies a number of aspects:

  1. Which Vagrant box (e.g. dataspects/ubuntu-1404-temp) will be used as the basis for the VirtualBox virtual machine into which the system will be cloned. In order not to have to adapt the box when making configurative changes to the system being cloned (e.g. adding MediaWiki extensions), the box shall be provisioned up to the Conceptual Layer "Infrastructure". Subsequent provisioning will be carried out by pertinent Ansible tasks specific to your environment and Duplicity modalities.
  2. Because of issues regarding "Warning: Authentication failure. Retrying... " after packaging box, the Vagrantfile uses config.ssh.username/password method to connect to the box at startup. Ideally this should happen using SSH keys.
  3. Connecting to the box is necessary in order to set up the shared folders as specified in the Vagrantfile. This functionality requires the box to run the correct version of the VirtualBox guest additions. In case your workstation upgrades its version of VirtualBox, the box' version of the VirtualBox guest additions need to be matched to the workstation's version of VirtualBox. The above mentioned vagrant-vbguest Vagrant plugin facilitates this process upon cloning a system. An alternative to this is to repackage the box after having installed the correct VirtualBox guest additions. Besides for development reasons, a shared folder is necessary if Duplicity snapshots are obtained through Dropbox, see https://dataspects.com/easy-system-cloning.

Functional Model

<mermaid2> graph LR

VGF["DSKMFSystem/Vagrantfile

   config.vm.box = 'ubuntu/bionic64'
config.vm.synced_folder '/home/user-on-host/Snapshots', '/home/user-on-vm/Snapshots'
config.vm.synced_folder '/home/user-on-host/DSKMFSystem', '/vagrant'"]

subgraph Step 0: Prepare

   IDO["install-docker.ansible-playbook.yml"]
   IRU["install-restoring-user.ansible-playbook.yml"]
   SDC["start-docker-containers.ansible-playbook.yml
watch 'docker image ls ; docker container ls ; docker network ls'"]

end

subgraph start-docker-containers.ansible-playbook.yml

   DMN["docker network create \
myNetwork --driver bridge "] MDB["docker run \
--network myNetwork \
--name dsMariaDB \
-e MYSQL_ROOT_PASSWORD=my-secret-pw \
-d \
mariadb:10.3.6 "] MDBdf["Click for Dockerfile"] DRA["docker run \
-itd \
--network myNetwork \
-p 80:80 \
-v /path/to/wikiroot/on/vm:/path/to/wikiroot/in/container \
--name dsApache \
dataspects/apache "] DRAdf["Click for Dockerfile"]

end SDC -->|"starts"| DMN SDC -->|"starts"| MDB SDC -->|"starts"| DRA DRA -.- DRAdf MDB -.- MDBdf click DRAdf "https://github.com/dataspects/DSKMFSystem/blob/master/apache/Dockerfile" "Dockerfile" click MDBdf "https://github.com/docker-library/mariadb/blob/27b1b68e3bd68f114609090ccb54318fe48d7e7e/10.3/Dockerfile" "Dockerfile"

subgraph Step 1: Execute

   RDS["restore-duplicity-snapshot.ansible-playbook.yml"]

end VGF -->|"runs"| IDO VGF -->|"runs"| IRU VGF -->|"runs"| SDC VGF -->|"runs"| RDS

subgraph restore-duplicity-snapshot.ansible-playbook.yml

   DDU["DUPLICITY_SNAPSHOTS_URL= ;
RESTORE_TARGET_DIRECTORY_URN=/path/to/wikiroot/on/vm ;
PASSPHRASE= ;
ENCRYPT_KEY_ID= ;
docker run \
--rm \
--user=$UID \
-e PASSPHRASE=$PASSPHRASE \
-v $PWD/.cache:/home/duplicity/.cache/duplicity \
-v $PWD/.gnupg:/home/duplicity/.gnupg \
-v $SOURCE_URL:/source/ \
-v $TARGET_DIRECTORY_URN:/target/:rw \
dataspects/duplicity \
duplicity \
--allow-source-mismatch \
--encrypt-key $ENCRYPT_KEY_ID \
file:///source/ /target/ "] DDUdf["Click for Dockerfile"]

end RDS -->|"runs"| DDU DDU -.- DDUdf click DDUdf "https://github.com/dataspects/DSKMFSystem/blob/master/duplicity/Dockerfile" "Dockerfile"

classDef shellCommand font-family:monospace; class DMN,DDU,MDB,DRA shellCommand </mermaid2>