#DeployApp
Explore tagged Tumblr posts
katyslemon · 4 years ago
Text
How to Deploy Angular 12 Application Using Firebase Hosting?
There are a number of organizations providing free hosting of applications irrespective of their size. Each of them provides different features and functions. One of them is Firebase, which can store your hosting content upto 10GB and can store a 1GB real-time database, and 10GB/month can be downloaded.
Overview
Today, in this tutorial, we will be learning how painless it is to deploy an Angular 12 application on Firebase using its Firebase hosting feature.
Prerequisites
Node and Angular CLI are already installed.
I assume you have already created your angular application. If not, you can create a new project using the following command: ng new project-name project-name is variable; the project that I have created is angular12-hosting.
Well, we are ready with the project now. So let’s follow the steps below to host our application.
Read more: Deploy Angular 12 Application using Firebase Hosting
0 notes
crookedstrawberryninja · 4 years ago
Text
Run Macos On Virtual Machine
Tumblr media
What is a virtual machine?
Run Macos On Virtual Machines
Run Linux On Mac Virtual Machine
Run Linux On Mac Virtual Machine 2019
A Virtual Machine(VM) is a compute resourcethat uses software instead of a physical computerto runprograms and deployapps. One or more virtual “guest” machinesrun on aphysical “host” machine.Each virtual machine runs its own operating systemand functions separately from the other VMs,even when they are all running on the same host. This means that, for example,a virtual MacOS virtual machine can run on a physical PC.
Sosumi is a snap package based on macOS-Simple-KVM that makes it easy to download and install macOS in a virtual machine (is comes bundled with qemu-virgil, which includes virtio-vga, a paravirtual 3D graphics driver). The virtual machine can then run alongside your normal Mac apps, such as Apple Mail and Safari, allowing you to run Windows and Mac apps on the Mac desktop at the same time. Yevgen is using the UTM app to run virtual machines on iOS devices, then has employed a process to create a virtual Hackintosh with a method shared on GitHub called OSX-KVM. KVM is an open source. Whether you want to try out macOS, run Xcode or make a hackintosh you can use a virtual machine to get started on macOS. Remember the performance of macOS, particularly graphical support is very limited on a virtual machine so performance with graphical animations will be subpar compared to a real mac or hackintosh, but it will still get the job done. A virtual machine (VM) is an operating system (OS) or an application that enables you to run multiple operating systems on the same physical hardware machine, and in a secure, isolated environment. For example, you can run and use a Windows 10 instance on a macOS Catalina machine or the other way around.
Get the latest edition of Next-Gen Virtualization for Dummies
Virtual machine technology is used for many use cases across on-premises and cloud environments. More recently, public cloud servicesare using virtual machines toprovide virtual application resourcesto multiple users at once, for even more cost efficient and flexible compute.
What are virtual machines used for?
Tumblr media
Virtual machines(VMs) allow a business to run an operating system that behaves like a completely separate computer in an app window on a desktop. VMsmay be deployed to accommodate different levels of processing power needs, to run software that requires a different operating system, or to test applications in a safe, sandboxed environment.
Virtual machines have historically been used forserver virtualization, which enables IT teams to consolidate their computing resources and improve efficiency. Additionally, virtual machines can perform specific tasks consideredtoo risky to carry out in a host environment, such as accessing virus-infected data or testing operating systems. Since the virtual machine is separated from the rest of the system, the software inside the virtual machine cannot tamper with the host computer.
How do virtual machines work?
The virtual machine runs as a process in an application window, similar to any other application, on the operating system of the physical machine. Key files that make up a virtual machine include a log file, NVRAM setting file, virtual disk file and configuration file.
Advantages of virtual machines
Virtual machines are easy to manage and maintain, and they offer several advantages over physical machines:
VMs can run multiple operating system environments on a single physical computer, saving physical space, time and management costs.
Virtual machines support legacy applications, reducing the cost of migrating to a new operating system. For example, aLinux virtual machine running a distribution of Linux as the guest operating system can exist on a host server that is running a non-Linux operating system, such as Windows.
VMs can also provide integrateddisaster recoveryand application provisioning options.
Disadvantages of virtual machines
While virtual machines have several advantages over physical machines, there are also some potential disadvantages:
Running multiple virtual machines on one physical machine can result in unstable performance if infrastructure requirements are not met.
Virtual machines are less efficient and run slower than a full physical computer. Most enterprises use a combination of physical and virtual infrastructure to balance the corresponding advantages and disadvantages.
The two types of virtual machines
Users can choose from two different types of virtual machines—process VMs and system VMs:
A process virtual machineallows a single process to run as an application on a host machine, providing a platform-independent programming environment by masking the information of the underlying hardware or operating system. An example of a process VM is the Java Virtual Machine, which enables any operating system to run Java applications as if they were native to that system.
A system virtual machineis fully virtualized to substitute for a physical machine. A system platform supportsthe sharing of a host computer’s physical resources between multiple virtual machines, each running its own copy of the operating system. This virtualization process relies on ahypervisor, which can run on bare hardware, such as VMware ESXi,or on top of an operating system.
What are 5 types ofvirtualization?
All the components of a traditional data center or IT infrastructure can be virtualized today, with various specific types of virtualization:
Hardware virtualization:When virtualizing hardware, virtual versions of computers and operating systems (VMs) are created and consolidated into a single, primary, physical server. A hypervisor communicates directly with a physical server’s disk space and CPU to manage the VMs. Hardware virtualization, which is also known as server virtualization, allows hardware resources to be utilized more efficiently and for one machine to simultaneously run different operating systems.
Software virtualization:Software virtualization creates a computer system complete with hardware that allows one or more guest operating systems to run on a physical host machine. For example, Android OS can run on a host machine that is natively using a Microsoft Windows OS, utilizing the same hardware as the host machine does.Additionally, applications can be virtualized and delivered from a server to an end user’s device, such as a laptop or smartphone. This allowsemployees to accesscentrally hosted applications when working remotely.
Storage virtualization:Storage can be virtualized by consolidating multiple physical storage devices to appear as a single storage device. Benefits include increased performance and speed, load balancing and reduced costs. Storage virtualization also helps with disaster recovery planning, as virtual storage data can be duplicated and quickly transferred to another location, reducing downtime.
Network virtualization:Multiple sub-networks can be created on the same physical network by combiningequipment into a single, software-based virtual network resource. Network virtualization also divides available bandwidth into multiple, independent channels, each of which can be assigned to servers and devices in real time. Advantages include increased reliability, network speed,security and better monitoring of data usage. Network virtualization can be a good choice for companies with a high volume of users who need access at all times.
Desktop virtualization:This common type of virtualization separates the desktop environment from the physical device and stores a desktop on a remote server, allowing users to access their desktops from anywhere on any device. In addition to easy accessibility, benefits of virtual desktops includebetter data security, cost savingson software licenses and updates, andease of management.
Run Macos On Virtual Machines
Tumblr media
Container vs virtual machine
Likevirtual machines, container technology such as Kubernetesissimilar in the sense of running isolated applications on a single platform. While virtual machines virtualize the hardwarelayer to create a “computer,”containers package up just a single app along with its dependencies.Virtual machines are often managed by a hypervisor, whereas container systems provide shared operating system services from the underlying host and isolate the applications using virtual-memory hardware.
A key benefit of containersis that they have less overhead compared to virtual machines. Containers include only the binaries, libraries and other required dependencies, and the application. Containers that are on the same host share the same operating systemkernel, making containers much smaller than virtual machines.As a result,containers boot faster, maximize server resources,and makedelivering applicationseasier. Containershave become popluar foruse cases such as web applications, DevOps testing, microservices and maximizing the number of apps that can be deployed per server.
Virtual machinesare larger and slower to boot than containers. They are logically isolated from one another, with their own operating system kernel, and offer the benefits of a completely separate operating system. Virtual machines are best for running multiple applications together, monolithic applications, isolation between apps, and for legacy apps running on older operating systems.Containers and virtual machines may also be used together.
Setting up a virtual machine
Virtual machines can be simple to set up, and there are many guides online that walk users through the process. VMware offers one such usefulvirtual machine set-up guide.
Related TopicsVirtual Desktop Infrastructure Virtual Desktops Business Mobility Server Virtualization Network Virtualization Virtual Networking
VMware Virtual Machine related Products, Solutions, and Resources
Hackintoshes – PCs tweaked to run macOS with workarounds have been around for a while. But as Apple only wants its software to run on its own devices, it’s become more difficult over time to actually use them as functional machines. Now a new type of Hackintosh appears to be gaining some traction that may be useful for research and educational purposes, virtual Hackintoshes. Interestingly, a video of an iPad running macOS has just surfaced as the latest virtual Hackintosh.
On YouTube, Yevgen Yakovliev shared an almost 40-minute walkthrough of what appears to be macOS Catalina running on a 2020 iPad Pro. Notably, this isn’t a method of running macOS Big Sur on the iPad Pro’s A12Z ARM chip.
Yevgen is using the UTM app to run virtual machines on iOS devices, then has employed a process to create a virtual Hackintosh with a method shared on GitHub called OSX-KVM. KVM is an open source Kernel-based Virtual Machine utility built into Linux.
Described by RedHat: “Specifically, KVM lets you turn Linux into a hypervisor that allows a host machine to run multiple, isolated virtual environments called guests or virtual machines (VMs).”
Notably, Kholia who posted the OSX-KVM resources on GitHub notes in the README that they are looking for help documenting the process of “running macOS on popular cloud providers (Hetzner, GCP, AWS).” It’s possible this example of macOS Catalina running on iPad could be a cloud-based Virtual Hackintosh.
As for the legality of all this, Kholia shared the following:
The “secret” Apple OSK string is widely available on the Internet. It is also included in a public court document available here. I am not a lawyer but it seems that Apple’s attempt(s) to get the OSK string treated as a trade secret did not work out. Due to these reasons, the OSK string is freely included in this repository.
Please review the ‘Legality of Hackintoshing’ documentation bits from Dortania’s OpenCore Install Guide.
Gabriel Somlo also has some thoughts on the legal aspects involved in running macOS under QEMU/KVM.
You may also find this ‘Announcing Amazon EC2 Mac instances for macOS’ article interesting.
This is similar for macOS to what Apple took Correllium to court over with the latter offering iOS virtualization. Just last month, Corellium won part of the lawsuit.
Kholia also highlights:
My aim is to enable macOS based educational tasks, builds + testing, kernel debugging, reversing, and macOS security research in an easy, reproducible manner without getting ‘invested’ in Apple’s closed ecosystem (too heavily).
These Virtual Hackintosh systems are not intended to replace the genuine physical macOS systems.
Run Linux On Mac Virtual Machine
Yergen also cited this post on virtualizing OpenCore and x86 as helpful in their work to get macOS working on the iPad Pro.
Run Linux On Mac Virtual Machine 2019
FTC: We use income earning auto affiliate links.More.
Tumblr media
0 notes
luxus4me · 8 years ago
Link
Envato Tuts+ Code http://j.mp/2t0tb9d
One of Ionic's strengths is in the services that it offers on top of the framework. This includes services for authenticating users of your app, push notifications, and analytics. In this series, we're learning about those services by creating apps which make use of them. 
In this post, we're going to take a look at Ionic Deploy. This service allows you to publish changes to your Ionic app without the need for recompiling and re-submitting it to the app store. This is very useful for quickly pushing bug fixes, minor updates and other cosmetic changes to the app. With the "Deploy Channels" feature, you can also perform A/B tests by introducing different code changes to different deploy channels.
Not all changes that you want to introduce to your app can be pushed using Ionic Deploy, though. Only changes to your HTML, CSS, JavaScript, and assets under your www directory can be pushed this way. Binary changes such as updates to the Cordova platform version, Cordova plugins (either updating existing ones or adding new ones), and app assets such as the icon and splash screen cannot be pushed using Ionic Deploy. 
How It Works
In your Ionic app, you can have code that will check for available deployments (updates). By default, it will check for deployments in the production channel. But you can also specify other channels to receive updates from. 
You can then push your changes using the ionic upload command. This will upload your changes to Ionic Cloud. Once they're uploaded, you can choose which channel you wish to deploy to, and whether to deploy now or at a later time. 
Deploying to a channel that your app is monitoring will trigger the code in your app to execute. That code is then responsible for downloading the update, extracting it, and reloading the app to apply the changes.
What You'll Be Building
In this post, you'll be using the command line to push the changes and test if the deploy works as expected. To keep things simple, the changes that we're going to introduce will be mainly to the UI. For every deploy, we're going to change the version number displayed for the app. We're also going to change the image displayed on the app to show that assets can be updated as well.
Setting Up
Now that you have an idea of how Ionic Deploy works and what you will be building, it's time to get your hands dirty by actually creating an app which uses Ionic Deploy. Start by bootstrapping a new Ionic app:
ionic start --v2 deployApp tabs
The command above will create a new app using the tabs template. Navigate inside the deployApp directory once it's done installing:
cd deployApp
Next, you need to install the @ionic/cloud-angular package. This is the JavaScript library for the Ionic Cloud service. It allows us to interact with the Ionic Deploy service and other Ionic services via JavaScript code.
npm install @ionic/cloud-angular --save
Once that's done installing, you can now initialize a new Ionic app based on this app. Before you do so, make sure that you already have an Ionic account. The command line tool will prompt you to log in with your Ionic account if you haven't done so already. 
ionic io init
This will create a new app named "deployApp" (or whatever you named your app when you bootstrapped a new Ionic app) under your Ionic apps dashboard. 
Once you've verified that the app is listed on your Ionic dashboard, go back to the terminal and install the Deploy plugin:
cordova plugin add ionic-plugin-deploy --save
Note that this plugin is the one which actually does the heavy lifting. The @ionic/cloud-angular package simply exposes the APIs required for easily working with the Ionic services inside an Ionic app.
Working With Deploys
Now that you have done all the necessary setup, it's time to add the code for checking and applying updates. But before you do that, first serve the app through your browser:
ionic serve
This allows you to check whether the code that you've added is working or not. This way you can make the necessary corrections as soon as you see an error.
Open the src/app/app.module.ts file. Under the SplashScreen import, import the services needed for working with Ionic Cloud:
import { SplashScreen } from '@ionic-native/splash-screen'; // add the following: import { CloudSettings, CloudModule } from '@ionic/cloud-angular';
Next, add the app_id of your Ionic app. You can find this on your Ionic app dashboard, right below the name of the app.
const cloudSettings: CloudSettings = { 'core': { 'app_id': 'YOUR IONIC APP ID' } };
Once you've added that, you can now include it as one of the modules of the app:
@NgModule({ declarations: [ //... ], imports: [ BrowserModule, IonicModule.forRoot(MyApp), CloudModule.forRoot(cloudSettings) // <-- add this ], });
Next, open the src/app/app.component.ts file. Right below the TabsPage import, include the following:
import { TabsPage } from '../pages/tabs/tabs'; // add these: import { AlertController, LoadingController } from 'ionic-angular'; import { Deploy } from '@ionic/cloud-angular'; // import the Deploy service from @ionic/cloud-angular package
In the constructor(), add the services that we imported earlier:
constructor(platform: Platform, statusBar: StatusBar, splashScreen: SplashScreen, public deploy: Deploy, private alertCtrl: AlertController, private loadingCtrl: LoadingController){ //... }
Setting the Deployment Channel
Since we're still developing the app, set the deployment channel to dev:
this.deploy.channel = 'dev';
Later on, if you want to switch to the production channel, you can simply remove this line as production is the default channel for deployments. If you have created another channel, you can also include its name here.
Working With Snapshots
You can access an array of snapshots that have been previously downloaded by the app. The snapshots variable is an array containing the IDs of each of the snapshots.
this.deploy.getSnapshots().then((snapshots) => { console.log('now getting snapshots...'); console.log(snapshots); });
We won't really be using snapshots for this app, but it's good to know that the app is storing this type of information for later use. In the example below, we'll go through the list of old snapshots and delete each one to free up some space on the device.
snapshots.forEach((snapshot_id) => { this.deploy.getMetadata(snapshot_id).then((metadata) => { // do something with metadata }); // delete snapshot this.deploy.deleteSnapshot(snapshot_id); });
Checking for Updates
To check for updates, use the check() method. This returns a boolean value that tells you whether a new snapshot is available or not. By default, the latest deploy will create a new snapshot. So only the latest deploy will be applied if you pushed two updates consecutively.
this.deploy.check().then((snapshotAvailable: boolean) => { // ... });
If a snapshot is available for download, you can get additional information about it by calling the getMetaData() method. This metadata can be added to a deploy through the Ionic app dashboard. Key-value pairs can be added here, and each of them becomes available as a property for the metadata object. Later on, we will be using metadata to customize the messages shown in the app every time a new update becomes available.
if (snapshotAvailable) { // get metadata this.deploy.getMetadata().then((metadata) => { console.log('now getting metadata..'); console.log(metadata); }); }
Next, show a confirmation alert message to let the user decide whether they want to download the update or not:
let alert = this.alertCtrl.create({ title: 'Version ' + metadata.version + ' is available', message: 'Do you want to download this update?', buttons: [ { text: 'No', role: 'cancel', handler: () => { // do some stuff (e.g. add analytics code for counting how many users didn't apply the update) } }, { text: 'Yes', handler: () => { // proceed with downloading the update } } ] }); alert.present();
You might be concerned that this would annoy the user if they continue to receive the prompt to update their app if they keep responding "No". More often that not, though, this is actually a good thing. There shouldn't be any reason for a user to reject an update if it's going to improve their experience. 
Downloading and Applying Updates
When the user agrees, you can go ahead and download the update. This may take a while depending on your internet connection and your device. Once the update is downloaded, show a loader to attract the user's attention while it extracts. Once it's extracted, reload the app and hide the loader.
this.deploy.download().then(() => { // download is done console.log('download completed!'); // show loader let loading = this.loadingCtrl.create({ content: 'Now reloading the app...' }); loading.present(); // extract the update this.deploy.extract().then(() => { console.log('extract completed!'); this.deploy.load(); // reload the app to apply the changes console.log('reload completed!'); loading.dismiss(); }); });
Take a look at what the updated app.components.ts file should look like after all those changes.
Installing the App on the Device
Now that the code for checking deploys is added, we can build the app and install it on a device. The rest of the changes that we're going to introduce will be primarily pushed through the Ionic Deploy service. 
Go ahead and add the android platform to your Ionic project and build the .apk file with the following commands:
ionic platform add android ionic build android
This will create an android-debug.apk file inside the platforms/android/build/outputs/apk folder. Copy it to your device and install it.
Pushing Changes
Now it's time for us to push some changes to the app. To try it out, just make some minor changes to the app UI. And now you can upload the changes:
ionic upload
Adding Metadata
Once it's done uploading, a new entry will be listed in your Recent Activity. Click the Edit link of that entry. This will allow you to add a note, versioning information and metadata to that specific release. It's always a good idea to add a note so you know what that specific release is all about. Once you've done so, click on the Metadata tab and add the following:
Then click on the Save button to commit your changes. Finally, click on the Deploy button to deploy the release. Once the app picks up on the change, the metadata that you supplied also becomes available. 
You can see that it now shows the version number of the release:
Versioning
Sometimes you will push an update out with Ionic Deploy, but also rebuild and ship those packages to the bundled app in the App Store. Watch out, though, because Ionic doesn't know that your app already contains that update, and your app will prompt the user to download the latest updates the first time your app is run.
The versioning feature can help prevent this. With the versioning feature, you can specify the version of the app which can receive the updates:
Minimum: deploys only if the current app version is higher or equal to this version.
Maximum: deploys only if the current app version is equal or lower than this version.
Equivalent: do no perform a deploy if the current app version is equal to this version.
You can add versioning information by clicking on the EDIT link on a specific release, and then going to the VERSIONING tab. From there, you can specify the versions (either iOS or Android) that you want to target.
What Ionic does is compare this version with the one that you specified in your config.xml file:
If the app version falls between the minimum and maximum specified, the release is picked up. And if the app version is equal to the equivalent version value, the release is ignored. So for the above screenshot, if the version indicated in the config.xml file is 0.0.1, the release will be ignored by the app.
Asset Updates
The next change that we're going to make is to show an image.
The first thing that you need to do is find an image. Put it inside the src/assets/img folder and link it from the src/pages/home/home.html file:
<ion-header> <ion-navbar> <ion-title>Home</ion-title> </ion-navbar> </ion-header> <ion-content padding> <ion-card> <img src="assets/img/lightning.png" /> <ion-card-content> <ion-card-title> Version 4 </ion-card-title> </ion-card-content> </ion-card> </ion-content>
Upload your changes as a new release to Ionic Deploy.
ionic upload
Once uploaded, go to your Ionic app dashboard and update the release with a note and the corresponding version in the metadata. Save the changes and deploy it.
Opening the app should now pick up this new release, and updating it would apply the changes to the UI.
Deploy Channels
By default, Ionic Deploy has three channels which you can deploy to: dev, staging, and production. But you can also create new channels for your app to listen for updates on. You can do that by clicking on the gear icon on the Ionic Deploy tab on your app dashboard:
This is useful for things like A/B testing, so you can push specific changes to specific users only.
Don't forget to update your code to use that specific deploy channel:
this.deploy.channel = 'me';
Rollback
If you've pushed something you shouldn't have, you could use the rollback feature. With this feature, you can push a previous release back to your users. 
Note that you can't fix broken code by rolling back! For example, if you have a syntax error in your JavaScript code, it will break the whole app and the code for checking for updates won't ever run. To fix those kinds of errors, the only thing you can do is release a new version on the app store. 
You can rollback by clicking on the Roll back to here link on any given deploy. 
This will ask you to confirm whether you want to roll back or not. Once confirmed, it will be automatically set as the current release. So the code for picking up new releases will recognize it as the latest release and will prompt users to update. Rolled back releases will have an orange refresh icon.
You can also deploy a specific release by clicking on the Deploy link beside the release that you want to deploy.
Using Git Hooks
You can automate the deployment of app updates on Ionic Deploy with Git hooks. Git hooks allow you to execute scripts before or after specific Git events such as commit, push, and receive. In this case we will be using the pre-push hook to upload our changes to Ionic Cloud right before the git push command does its thing. 
Start by renaming the sample pre-push script to the actual name recognized by Git:
mv .git/hooks/pre-push.sample .git/hooks/pre-push
Open the file in your text editor and replace its contents with the following:
#!/bin/sh echo now pushing changes to Ionic deploy ionic upload
Now commit your changes and push them to a remote repo:
git add . git commit -m "make some changes..." git push origin master
Right before the git push command is executed, ionic upload will be executed. 
You can also automatically deploy the release if you want:
#!/bin/sh echo now pushing changes to Ionic deploy ionic upload --deploy dev
This won't work for our example, though, because you can't specify metadata!
If you want to take the deployment process further, I recommend you check out the HTTP API for Ionic Deploy. This allows you to programmatically deploy changes to your app from your Continuous Integration server. It allows you to update the version numbers and metadata on your deployments as well. All of this can be done automatically and without ever touching the Ionic app dashboard.
Conclusion
That's it! In this tutorial you've learned about Ionic Deploy and how you can use it to push updates to your Ionic app. This is a powerful feature which allows you to build a robust versioning and update system into your app.
Stay tuned for more content on Ionic and on cloud services like Ionic Deploy! If you want a complete introduction to getting started with Ionic 2 app development, check out our course here on Envato Tuts+.
Ionic
Get Started With Ionic 2
Reginald Dawson
And check out some of our other posts on Ionic and cross-platform mobile app development.
Ionic 2
Code Your First Ionic 2 App: A Photo Sharing App
Wernher-Bel Ancheta
Mobile Development
Introducing Vue and Weex for Native Mobile Apps
Lawrence Turton
App Templates
15 Best Ionic App Templates
Ashraff Hathibelagal
http://j.mp/2s2syP4 via Envato Tuts+ Code URL : http://j.mp/2etecmc
0 notes