I have a Virtual machine that I have customized with all the packages I need and it runs using virt-manager. I logged in and created a few directories and scripts in that image. I would like to "snapshot" it and run the snapshot on openstack. I don't care if the runtime state is preserved. All I want is for the packages and custom code that I have created on the virtual machine to be there.
I tried various things with the qcow2 image that virt-manager uses but that did not work. I don't quite understand - where are the changes I made to the file system?
I would like to generate an image with my customizations that I can subsequently run on an openstack cloud.
How can I proceed?
Thanks
Ranga
Related
I do most of my dev work locally but ocassionally I have to switch over to using a preconfigured jupyterlab instance on GCP. The way things are set up now, I'm unable to ssh into these notebook servers and the only way for me to interact with them is through the jupyterlab integrated terminal.
I have custom save hook functions set up in my local environment for testing, linting, etc.--comes in really handy for keeping everything in a production-ready state and I'd like to be able to set up a sort of "environment as code" system where when I pull updated code into a new environment, the customized configuration would move with it and take effect automatically. I suppose the proper way to do this would be to use a Docker image and rebuild the cloud instance from scratch every time it needs an update but it kind of seems like overkill for such minor changes. (Also the Google docker images don't work that well on my M1 MacBook ).
I am new to AEM, and would like to know how to take author instance into local instance. I can take the pushed changes made in project by using git command, then I can build the local by using mvn command. However I can't see the changes that I made in aem prod on local aem.
Can you help me regarding this. Thank you in advance!
If you are talking how you can have the changes made in pages in any of the environment to your local instance, then just create a content package in crxde in the environment from where you want the changes. After creating the package, download it and install in your local instance crxde.
The more direct approach is via the Package Manager, you create a package, enter the desired filters, then build and download. There are automated ways, by using the package manager with curl commands, Grabbit, etc. For local development probably you do not need to bring all the content, especially if the DAM is too big.
I made a jupyter notebook that can read hdf5 files and use some functions to analyze the data. I would like to put this jupyter notebook on a server containing different hdf5 files and make it available for people who are working in other places. An exemple of functions would be to see the expression of some genes in a sample. Those people could open this jupyter notebook and add a list of specific genes to look at.
I am looking at JupyterLab, but I can see that people can read and modify the notebook. I would like that even if they modify it, when they finish, the notebook is as it was before they opened it. Do you think it is possible to do that ? I think I could do it locally with "read-only" but I don't know how to do it on jupyterLab.
I am a newbie for things related to servers. I will really appreciate your help and suggestions.
Thanks a lot :)
Some suggestions:
You could supply the notebook via a code sharing resource like GitHub and let them clone/copy/download use it as they see fit via their own resources. This insures they aren't changing your source notebook. And you don't have to worry about computational resources because they can run it where they prefer such as on their own cluster or at a cloud center.
Typically, I'd suggest the MyBinder project at https://mybinder.org/ for what you describe as it lets you share temporary active sessions that launch on remote servers. You set up a Github repository with notebooks and the data or a way to retrieve the data built in the notebook and when the temporary session launches, users can work through your notebook. This way they can extend and modify and run their own data and not change your source notebook. However, the resources are limiting as it is free, see here.
Examples:
solve for sediment transport
Resolving the measurement uncertainty paradox in ecological management
A quick introduction to RNAseq
bendit-binder
blast-binder
I've seen others use Code Ocean, see an example here.
There are other national/government-funded centers that allow similar hosting of services and resources that can be shared with others. CyVerse is one that is now running in the United States and several place, such as CyVerseUK in association with the Earlham Institute, and elsewhere. They offer notebooks to be served via their VICE apps in their Discover environment. Their resource allows more computational power and storage than the free, public MyBinder service.
You can use Mercury framework. It is an open-source tool that converts Python notebooks into interactive documents, like web apps, reports, dashboards, slides.
It requires an YAML header in the first cell in the notebook. In the header you define the presence of the notebook in the Mercury (title, description, show-code). Additionally, you can add widgets to the notebook. Widgets are directly connected to variables in the notebook. The variables which values are controlled by widgets should be in the separate cell.
The example notebook
The example notebook with YAML header
The YAML header
There are two widgets defined in the below YAML header. The name and points widgtes have the same name as variables in the code. User can change the widgets values, click Run and the notebook will be executed with new values.
---
title: My notebook
description: Notebook with plot
show-code: False
params:
name:
input: text
label: What is your name?
value: Piotr
points:
input: slider
label: How many points?
value: 200
min: 10
max: 250
---
The Web Application from Notebook
The final notebook after execution can be downloaded as standalone HTML or PDF file.
Deployment
The Mercury framework is built on top of Django. It can be deployed on any machine with Python available. The deployment for Heroku is very simple, and can be done with two commands (you need to have Heroku CLI tool):
heroku create my-amazing-web-app-name-here
git push heroku main
Please make sure that there is Procfile created for Heroku deployment with:
web: mercury run 0.0.0.0:$PORT
You can also deploy Mercury with docker-compose. Please check the docs for more details. You can also check the article on how to share Jupyter Notebook with non-programmers with Mercury tool.
You can install a local Gitlab server instead of publishing on Github. Then publish your Jupyter notebooks in Gitlab. Share your server URL with people. Our company is running all internally.
I am new to docker and have hit a road block I am having troule figuring out.
Here is my scenario
Current (pre-container)
We do a Visual Studio Online build that outputs an MSI. The build uses the full .Net Framework (we will later go to .Net core).
The MSI is put on a flash drive and installed on an offline (no internet access) computer.
The MSI installs several Windows services that expose web api web services.
Local clients can query those web services.
Desired (containers)
We wish to replace the windows services with docker containers.
The installation still needs to be performed offline (no internet access)
We wish to use docker community edition to avoid cost.
One assumption: the offline computer will have docker installed and will have already downloaded the base image "microsoft/aspnet".
To start figuring this out, I simply created a new ASP.NET Web Application from VS 2017. I chose Web Api and to enable docker support. Great, now I have a container running with a web site / service in it. I next wanted to try to figure out how to deploy the container / image. For reference, here is the default Dockerfile that was created when I created the empty project.
FROM microsoft/aspnet:latest
ARG source
WORKDIR /inetpub/wwwroot
COPY ${source:-obj/Docker/publish} .
I first looked at "docker save". My thinking was that I could save the image as a file and use that to deploy the container. However, because I am using the full .net framework, the saved file is 7.7 GB. I understand why it is so large; that image has not only my sample web site in it, but also the microsoft/aspnet image in it too. After some googling, I found references do being able to exclude layers (https://github.com/moby/moby/pull/9304), but it does not appear that "docker save" supports that. Ultimately though, that is what I think I want - to be able to save just my layer to a file.
Am I going down the right path with trying to figure out how to save a layer? We are pretty open on how to accomplish this, but we are not able to deploy a 7.7 GB file for every software update.
Any suggestions on how to do this - especially any that incorporate the VS Online build are greatly appreciated.
Thanks.
The only way to transfer an image offline is to save it into tarball using docker save
As for the size of the image, the solution is to use a smaller aspnet. The one you are using is 7GB large. Thus you need to choose a smaller aspnet image that would be sufficient from the available ones
Another solution is to transfer the source code and build the image on the target machine. In this case, you save the microsoft/aspnet:latest to a tarball and transfer it once to the target machine. Whenever you have new updates in the source, you copy the source and the Dockerfile to the target machine and you build the image there.
I have created a Zone, Pod and Cluster on CloudStack.I have also added a host in the Cluster, added Primary Storage and Secondary Storage. But in System VMs, nothing is listed. Also, in the logs a message "No running ssvm is found, so command will be sent to LocalHostEndPoint" comes.
Somehow I deduced that due to this, template is not being added and consequently Instances can't be created as Instances use templates to add OS in VMs.
Can anybody please help to point out and sort the problem which may be the cause here.
You need to manually install the "system VM" templates. These are the images for worker VMs that CloudStack deploys to run system services. SSVM is an example of a SystemVM. It is responsible for copying templates to secondary storage.
See Prepare the System VM Template in the installation guide.