Ep#132 Deploy Your MAC In The Cloud with Sebastien Stormacq from AWS

May 29, 2023

Episode Summary

Welcome to the Jon Myer Podcast! In this episode, we have Sebastien Stormacq, a Principal Developer Advocate from AWS, as our guest. Our topic today is "Amazon EC2 Mac Instances and iOS Development." We will discuss how Macs are now available on-demand in the AWS cloud and how this offering improves iOS development pipelines and remote users. Sebastien will walk us through a demo of how to make changes to your application with Amazon EC2 Mac instances. Let's dive in!

Links: https://github.com/sebsto/amplify-ios-getting-started/

Sebastien - Headshot

About the Guest

Sebastien Stormacq

I am passionate about IT Technology at large, with special interest in development platforms & workflow, mobile and cloud computing. I speak fluent Python, NodeJS, Swift and occasionally dive into Kotlin, Java. Serverless is the way to go.

#aws #awscloud #finops #cloudcomputing #costoptimization

Episode Show Notes & Transcript

Host: Jon

Hi everybody and welcome to the Jon Myer podcast. Today we're talking about deploying Mac in the cloud. Yes, I said to deploy your Mac in the cloud. And joining us today is Sebastian Storm, who is a principal developer advocate at AWS. Before we bring Sebastian onto the show, how about a little bit of information about Seb? Well, Seb has been writing code since he first touched a Commodore 64 in the mid-eighties. Yes, right around that time when I started playing with mine. He's inspiring builders to unlock the value of AWS Cloud and using his secret blend of passion, enthusiasm, customer advocacy, curiosity, and of course creativity. His interest in software architectures, developing tools, and mobile communication. How about we bring Seb onto the show? Seb, thanks for joining me.

Guest: Seb

Thank you, Jon. Thank you for having me and good morning. Good afternoon to everybody.

Host: Jon

All right, so Seb, where are you located? Where are you based?

Guest: Seb

I might have noticed a slight touch of a French accent when I'm speaking. So I'm, I'm a native French speaker, but I'm not French. I'm from Belgium and I'm located close to Paris right now, the sunny north of France.

Host: Jon

Nope, I didn't notice an accent at all. Sound pretty plain

Guest: Seb

Kind.

Host: Jon

So, Seb, you know what? You have not, you and I have kind of known each other for quite a while whenever that was, yes, and all the content that you're sharing, and I've been trying to get you on the show and it just hasn't worked out with our schedules. Finally, I just tagged you on Twitter and I was like, yo, we've got to do this.

Guest: Seb

We have to do it now,

Host: Jon

And here we are, and today we're talking about deploying your Mac in the cloud, on the cloud, somewhere around the cloud. I'm not sure Sebastian is in the cloud. What is it all?

Guest: Seb

Oh,

Host: Jon

How about before we get to that, you give the audience a little bit of information about yourself more than what I read, but who is Sebastian?

Guest: Seb

Yeah, what he read is my official bio on my website and the one we published on the AWS news blog site as well. I'm a tech geek with, oh my god, almost 30 years of professional experience. That's why I have some white hairs as well and my white hairs there. I work as a pre-sales engineer at the end of the nineties and beginning of 2000 around the Java platform at the time when it was a big deal to choose a Java application server. We make studies for customers to help them choose a Java application server. If you even remember what is a Java application server I had a different position at cell microsystems at IBM and then I landed in the AWS training and certification team for three or four years. I deliver technical training to AWS customers. So I was traveling the world mostly in Europe but everywhere to teach architect DevOps and these types three days classes in person.

Guest: Seb

Then I move as a social architect to the Alexa team and I help customer to develop an application for Alexa when we launch Alexa in Europe, Italy, Spain, Germany, the UK, and France. And then I move back to AWS as a developer advocate. So I try to convince developers to prefer the AWS technologies versus something else. I refer to my job as planting seeds for the long term to show the possibility to inspire people so that they know it exists. Maybe they're not going to use it now, but at least it's the solutions I want to present should be part of the tool back of any take enthusiast or cloth enthusiast. That's a good definition for you.

Host: Jon

That was pretty good. You plant the seeds and I think that's valuable and keen a lot of the conversations because when you read a blog post or you see something online, you see possibilities that can achieve, right? You might not be doing it now, but what it does is it says, oh listen, I saw somebody do this online. It was pretty cool. What if I could do X, Y, and Z on top of what they did? And now you're building, you're enabling them to kind of do more, not only in the cloud but see what is possible.

Guest: Seb

Exactly. And it's a two-way avenue of conversation as well because I'm in touch with a lot of developers from different backgrounds and not only at-risk customers but also in third-party communities or technological communities that are not affiliated with us. So it's also a way to get in touch with reality and bring feedback to the service team. Typical feedback is about documentation getting started. It's too complicated. There are too many choices. So we help to provide the right message to developers to give them the right tools to get started, how to choose, which service to use, and how to get started If you are not an AWS expert,

Host: Jon

Hey, this seems like a good time to jump in and talk about today's sponsor. Veeam, how would you like to own control and protect your data in any cloud anywhere including AW w s Veeam backup for AWS is a native solution to protect all of your AW w s data. It's fully automated, set it, forget it within one platform, centrally managed. Veeam Backup for AWS is a robust solution for snapshot replication, full recovery within AWS granular file recovery, and recovery outside of AWS. Implement VE backup for AWS today before you find out that your current solution isn't working. Now how about we get you back to that podcast? So speaking of having too many tools to kind of get started, AWS released another one and what has it been about a year, two years already of Mac in the cloud. And speaking of that, the sub's actually going to be talking to us today about deploying your Mac in the cloud and we have a demo, so stick around. Seb, what does it mean to deploy your Mac in the cloud?

Guest: Seb

Yeah, many customers using are using Mac Minis for their C I C D farm. These types of banks for example, or companies that are providing mobile applications. There are tons of companies that are building iOS applications right now and to build an application for some phase of the build, you need to do that on Mac. Of course, the developer can write code on Linux or Windows, but if you want to assemble end-to-end your application and sign it for distribution on the app store, that process is officially supported on macros only. I'm not saying it's not possible to do it somewhere else, but it's officially supported on MAC only. And I, I'm talking, I'm talking with customers for two or three years about the usage of the macro and it's surprising to see how many customers have a couple of Mac minis in the closet or under a desk and it's like shadow it sometimes the IT department is not even aware that these Mac exist and they have all the problems that I think we solve since many years for Linux and Windows server.

Guest: Seb

They have to provision that manually. They have to connect it to the network to maintain it in operational condition to update software macros, and Xcode the developmental environment from Apple. So it takes a lot of time and it's very difficult to automate that. It's possible, but it's not spell well documented. It's many are not automating that so many customers are having a couple of people dedicated to maintaining this pool of Mac mini. So the idea is what if we can bring all the things that are customer knows and love about EC2 for the last 17 years or something, but bring that to MAC? So an API to start a machine, stop a machine to create a disc image, to create a snapshot to create security groups that will help customers a lot. And that's what we did with EC2 instances, you're right, it's roughly two years, two years and a half ago that we launched the first one X 86 max mini and now it's the second generation is there We have, I was about to say graviton, that's the whole brand. Apple, silicon. So an M machine from Apple. I'm talking aloud, sorry. So if interrupt me if you want to go into some details.

Host: Jon

No, Seb, you can talk as much as you'd like. This is all about you and deploying Mac on the cloud. I'll give you a little bit of information. I built an app for the app store. This was back, I won't date myself. Was it 10 years? Maybe some, yeah, I actually, I think it was about 10 years ago I worked for a beverage company and what I wanted to do is we had a very simple mathematic program that allowed you to punch a code in, it would give you a code back. This code was proprietary meaning that it allowed you to do something on another device rather than call the office. So every iPhone would have it or every user or admin would have it. We would give you a code, you punch it in and you're like, oh, now I can authorize this.

Host: Jon

I never made it to the official app store. I got to it. And they're like, well what is this? And I was like, it's more business use than end-user type use. But I had it on my phone and it worked out great because I never had to be around the laptop. I remember going through the entire process of installing the SDK, and the developer kit, and going through everything just to get this to work. It probably took me almost, I don't know, three or four weeks. You had to pay for the developer community and go through the entire process. It was worth it for me to learn it and now I can say I built one. It's no longer on my phone because it's not supported. But either way, I thought it was pretty cool. And when you know AWS released this, I remember seeing the picture of them wheeling off all these Mac minis from the truck.

Host: Jon

I thought it was pretty cool just to see this entire, I'll never be able to see all these in one place again, but I love that AWS has released this, has made it available for everybody, and developed several apps within aws. Hey, this looks like a good place to jump in and talk about today's sponsor. Veeam, how would you like to own control and protect your data in the cloud? Are you using Salesforce? Veeam has you cover it with Veeam Backup for Salesforce, backing up your Salesforce data Everly, whether it's on-premise or in the cloud. Honestly, why wouldn't you back up your most critical CRM data from loss or corruption? Now imagine your sales team coming in and not being able to recover all their information, their notes, their pipeline because it's the one thing you didn't think you needed to backup up. How about doing it effort to be backup for Salesforce there are nine reasons that you should back up your Salesforce data. How about just two data loss and data corruption being backup for Salesforce eliminates the risk of you losing your data and metadata due to human error integration or other Salesforce data law scenarios? Check out the Veeam bag for Salesforce today. Now how about we get you back to that podcast? There

Guest: Seb

Is a lot of innovation going into that because if you think about it, we give access to the Mac mini, to a VPC private network to security groups to IM policies? So as I said, all the things customers are used to finding on Easy two, they find the same on macros and the magic. No, it's not magic, it's engineering. But the piece of engineering that allows us to do that is Nitro. Nitro is the virtualization system from Easy Two. So it's a mix of software and hardware that allows us to create the easy two instances. And so the Mac mini is, it's a Mac mini, a standard part from Apple. There is absolutely nothing different or special about AWS. It's not out ones that we bought from Apple and we connect them through an external port through the nitro cart. So in the one U chassis of the rack, you have the Mac mini connected with a bunch of cables to the nitro cart and the nitro cart is what is connected to the rest of the network. So that gives access to EBS for example, to give the micro-volume to boot and that allows you to create snapshots and AMI the security groups, the VPC, and all the virtualization. I was again going to say magic, but it's not magic, it's just engineering happens at the nitro level. They even develop a robotic finger because sometimes we need to power off the machine and to power it on and so there is a little mechanical finger that pushes the button on and off whenever we need to turn off the machine.

Host: Jon

Are you serious

Guest: Seb

Access to the machine? Yeah, I'm serious.

Host: Jon

Oh my god, I want to see this. That's pretty cool. I mean you don't need it, I remember going into data centers and pressing that power button and oh hey, can you get up at four o'clock in the morning and go power off this server?

Guest: Seb

We cannot do that at the scale at which we operate. Everything has to be automated and so yes, as you said, we have a lot, I'm not going to give a number, I don't know the number, but a lot of this machine that customers can acquire on-demand that that's, I think it's unique on the market. You don't need to call us beforehand or you just go to the console just like you do. It has to go through a dedicated host that's a bit different from Linux and Windows and that's a requirement from the Mac was license term. If you own a Mac and you let someone else use it, it has to be the entire machine and not the filter machine on that machine. So the step is to reserve a dedicated host and then you start and stop the instance, which is a full bar metal machine. So you have full performance, there is no overhead provided by your virtualization,

Host: Jon

The engineering that goes behind it. Now I can understand a dedicated hose because here, here's what I was thinking. I was like, okay, EC2 instances. I can spin up as many as I want wherever I want, but how do they know I want a Mac here or Mac here? How do I allocate so many Macs and walk through any kind of visualization that these are attached to the Nitro cards? They're actually on a dedicated hose. I envision seeing these Mac minis racked in or have a special hook to the dedicated host behind each one. Is it one Mac mini per dedicated host or can I have multiple Mac Minis or Mac? We'll just say we won't say Mac Minis. Mac OS is per dedicated host or can I have multiple?

Guest: Seb

Yeah, right now it's Mac Minis we can say Mac Mini. Maybe in the future, we'll have other types as well, but right now it's Mac Mini. Its one dedicated host is a full Mac mini that you reserve for your usage. So you are the sole exclusive user of that Mac Mini during the time to which the dedicated host is attached to your account. As soon as you release the dedicated host, of course, it's going to be cleanup scrubs and put back in the available pool for another customer to grab it.

Host: Jon

Seb, let me ask you that. What was the whole idea behind creating these, creating a Mac option for W's customers? And I'm, I already kind of know the answer thinking customer obsession and the request for it, but isn't it easier for them to just do it on their own or have this dedicated?

Guest: Seb

There are two main use cases from our customers. The one I mentioned at the beginning, it's the ICD. So to create a farm of machines for the build and test and signature job. Another one is to give access remotely to a development machine. Some companies are using workers that are overseas and it's sometimes easier to prepare machine cloth and give them access to that machine rather than ship physically a Mac. But in both cases it goes to the core of the cloud messaging or the EC2 messaging, having on-demand access to resources that you can programmatically configure. So it's much easier for a max system admin to use the EC2 API to create an instance and create a golden AMI restart as many instances as needed. If something goes wrong, you just terminate the instance, you spawn a new one. All of that can be automated and so it's time that is free up from managing premises machine and time that you can use to do something with a bit higher value into the chain and focus on your application and on the things that make your application different from competition rather than doing the undifferentiated heavy lifting like Verna to code it.

Host: Jon

Everybody we're talking with step storm, a principle developer advocate at AWS around the topic of deploying your Mac in the cloud, our whole conversation is about AWS creating an AW WS image or a Mac mini to a dedicated host for you to deploy Mac OS and it's not just a laptop or a workstation. Think of it from an application or building apps, a global access device to build it for your work, your workforce. You said why put applications on Originally when this came out I was like, Ooh man, I can have a Mac OS on AWS and I can go in there and now I'm able to access it. But that's kind of a little costly to have a virtual workstation on an Amazon instance. Why applications that

Guest: Seb

That's, that's true. The use case is not a replacement of the laptop on your desk unless there are very specific requirements as I mentioned, overseas workers that need to have access to a dedicated environment or a very specific environment. But you should look at it as the whole cost of management of this machine. As I said, it's everything that and love from easy two that you can apply to macros. So if you zoom out, it's not just having access to a Mac mini, you have access to a nitro card. Doesn't ring a bill ring, ring a bell like that. But it means it can be integrated with your private resource on your private networks, and get access to private APIs that are accessed during the build. It fits within the enterprise of procurement billing and InfoSec process for customers that are already AWS customers, they know how to procure a resource to acquire more resources.

Guest: Seb

The billing channel is already in place and more importantly, the security, the channel, the compliance, the verification, it's an easy instance. So it emits CloudWatch. It can be monitored through the typical monitoring solution that a customer is using on AWS. So all the framework that an InfoSec team has put in place now fits also for macros whereas before that if you have a macros MAC mini in the closet, it's like a separate world. How do you ensure that the back mini in the closet is compliant with your latest security guidelines? You cannot, once it is an easy two-instance, you can,

Host: Jon

Oh right, there's the value. I mean you are already experienced in deploying out a W s, whether it's through like a C I C D, you're utilizing IM policies, VPN security groups, you're getting everything integrated from Nitro and it's just an Amazon instance with a different OS available to it all the engineering behind this for it to work is mind-blowing. You think as somebody just took it, they plugged it in and said, hey, it's all going to work on anything. But there was a lot of thought going into it to make this integrated with AWS services. Seb, let's talk about iOS and deployment and kind of the process behind it. Building the apps, I mean the use cases are endless. Having a Mac available to you globally for all your teams

Guest: Seb

Building an application on iOS is something super easy to do with a graphical user interface. Xcode is the Apple development tool and most Apple know to use Xcode and Xcode is doing a lot of things behind the scene for you. When you use an easy two-Mac instance, by default there is no graphical user interface and I don't recommend starting one. It's possible you can have a graphical user in the interface and click just like you do for Windows with RDP for example. There is the same for microwaves. But if you think about automation and scalability, what gives the value of the cloud, the machine should be able to boot and start to be useful automatically and you should not interact with that machine beyond the initial configuration. So everything has to be done through a common line either through s SSH or S S M system.

Guest: Seb

What is SSM? Security system manager, I always forgot the acronym, but SM connect it's, it's the AWS way to connect to a remote machine, Linux or Micros through an agent which is installed into the operating system. And when you start to build a sample and sign an iOS application with a photographic user interface, you realize that you need to massage the machine a bit and prepare the machine a bit to make it work, and that process is not documented. So I spent a lot of my time last year trying to document that. I have a series of blogs that are going to be published hopefully in the coming weeks and videos as well that explain how to prepare a cloud machine for CI/CD and I developed a demo with GitLab, GitHub, and Circle ci. So I use different ci cd providers to show how you can use an easy two Mac instance to integrate it inside your C I/CD pipelines.

Host: Jon

We have a demo that's coming up in just a few minutes. Sebs going to walk us through some of the use cases, and some of the things he's done with the Amazon instance Mac OS, he has his phone hooked up, and he has his all integrated. Give us just a few moments we're going to do that. Seb, before I let you do the demo, are there any limitations that you should be aware of utilizing the macros?

Guest: Seb

There is one, it's not a technical one, again, it's a licensing one. When you reserve a dedicated host, a Mac mini dedicated host, it's for a minimum of 24 hours. So you cannot release the dedicated host before 24 hours. And once again, it's something coming from the macros user license agreement. So it means that you acquirer host, it's for you for at least 24 hours. You can start an instance, or stop an instance, the billing is associated with the dedicated instance reservation, not with the easy two instances. So just like how dedicated instance works even before micro, the only thing different with Mac is that block of time. After that block of time, you can release of course at any time and you're built by the sun after the initial 24 hours. That's the only technical limitation. Oh, it's not technical, sorry, licensing limitation. Besides that, I don't think about any technical limitations. It's behaving like an easy two-instance. So the API that you are used to using for easy two instances applies to Micros as well. You can SSH to it and once you are on the Mac it's standout Mac, Mac, if you want to start a graphical user interface, you can.

Guest: Seb

Yeah, it's a standard macro. There is no really nothing special about AWS on macros itself.

Host: Jon

Okay, so the licensing limitation is 24 hours. I assume that when you first acquire this, you go in and you build out exactly how you want this to look, right? Your image, you build an image from it. So when you want to provision it again, you already have it up and running and you don't have to redo everything because it's going to take you longer than 24 hours to get the initial setup, correct? Correct.

Guest: Seb

At the initial setup, yes. If you are not used to configuring a Mac from a common line, it might take a bit more than 24 hours the very first time to get it right. Some customers are using a combination of Terraform and Packer scripts to build a golden image. The golden image is the one they are going to use to start other instances. So what they put in their golden image, typically it's their build toolchain, whatever libraries and tools they need to build their software, maybe their custom management agent just to be sure that this instance is part of the global fleet for InfoSec, again to keep an eye on the machine and typically they're going to have multiple golden images because in large iOS development shop, they want to build for the latest version of iOS but also for the previous one and most of the time for the next one, the next one to ensure that the application continues to work on better.

Guest: Seb

And so this requires a different version of Xcode to be installed. So what typically customers are doing, they are maintaining multiple gold images and each gold image is a combination of the macros version plus the Xcode version. So they might have 4, 5, 6, or 10 depending on how many of these combinations they want to maintain. They automate the creation of this golden image with Terraform might be cloud formation as well as the packer. And then they create poor l of CI/CD machines for specific macros version and iOS version, meaning that whenever a developer wants to test to build on a specific combination of macros and iOS version, they can select a specific pool to start from. Airbnb is an example of such a customer. They release a blog post explaining exactly what I just explained with all the details of their terraform and script. It's quite a fascinating read and it's in the notes of the podcast. I'll share the language You have done

Host: Jon

Well, how Seb you're a true pro I was going to ask you for the blog post and the link to it and I was going to ask you, can you group a bunch of these servers and Mac OS? You already indicated that you can put these into a pool, and distribute them to a pool of the environment and that's what allows you to have a dedicated host for each Mac mini or Mac instance for it. The only thing I'm going to leave with the audience is to be cognizant of cost optimization. If you're going to deploy this out on a Friday, my suggestion is the wait until the following week because you're not going to use it for the 24 hours that's happening unless you have a team right around the cycle for it. Seb, let's get to this demo. Oh no,

Guest: Seb

Go ahead. One thing, one more thing before the demo saving plans apply. So if you have computed saving plans, saving

Host: Jon

Plans

Guest: Seb

A way to buy capacity ahead of time. If you have a compute-saving, time-saving plan, it applies to easy two macros as well and you can get up to 44% cost reduction compared to the on-demand price.

Host: Jon

Oh, that's a good SA cost saving, I didn't know when those savings plans apply actually to the Mac OS itself. Is it to the Mac os or is it just at a dedicated host and the number of OS?

Guest: Seb

Dedicated host?

Host: Jon

I gotcha. Well, that's why it applies. Well, that's always good, another cost-saving step. Okay, now we got two in this one Zeb, let's get to that demo. What are you showing us?

Guest: Seb

CI cd pipeline for an iOS application? So I have a very simple iOS application, something I wrote myself so it's not super fancy. Use different groups of backend services group behind Amplify. It's a library that makes it easy for a mobile application developer to access cloud-based services. So the application uses a graph Q L an API S3 for image storage and Cognito for user authentication. And I took a C two Mac instance, install its code on it, installed the GitLab agent on it and I hook it up to GitLab. So the flow is starting from the developer, the developer pushes a commit to GitLab GitLab and informs the agent running on Amazon EC2 Mac that there is a new version of the source code available and that agent will run the full pipeline until the end. So it'll also push the application binary to App Store connect and to an application from Apple called test Flight. Test flight. It's an Apple application that allows a developer to distribute a binary version, a version of your application to your data tester to the people that will test the application before it's available on the app store. And it's fully automated so you have nothing to do. It goes from the GitLab push to the application being downloaded on the phone automatically. And that's what I would like to show the, is it clear? Any questions before I dive into the details?

Host: Jon

Nope, let's do this.

Guest: Seb

Okay, so the whole thing takes roughly seven, eight minutes on this setup. I hear my demo application, it's like a memory-keeping tracking application where you can take a picture of a specific memory on a specific day and associate a note and you see the application on the right side of the screen. It's running in the simulator of Xcode, the Canva of Xcode. And you see that there is a picture, and there is text, but there is also something like a gray background around the picture, which is not so nice. So many customers say, Hey, can we remove that? And as a developer, I'm always listening to my customer. So I say yes, of course, I'm going to remove the gray background. So I go to the source code, I look at the line responsible for that great background and you see in the simulator the change is valid. Now I have a wide background for my test as far as my application. So I want to push that code change through my pipeline to have the updated application here on my phone. So you cannot see the screen of my phone. But if I do this, you see that I have the same application running on my phone with a gray background. So that's the bad version. The one I want to update, oops. And I have someone trying to call me just when I show you the screen

Host: Jon

That's

Guest: Seb

Actually like Amazon delivery.

Host: Jon

Perfect. That's perfect timing. That typically happens, right? You have everything silenced, whatever it is. Here's my demo. The one time somebody could call or shouldn't call, they

Guest: Seb

Call, I receive one phone call per week and it's right now. So let's push my change to my GitLab repository. So from Xcode source control commits, I put a commit message here, removing the gray background. Please always put a commit message to your commit.

Host: Jon

What can't I just say updating?

Guest: Seb

That's something I can

Host: Jon

Do and I'm trying my stuff. I'll probably put like message updating, message

Guest: Seb

Updating and I push that to GitLab main apps. So it should go directly to GitLab. So switching to the GitLab website, that's my repository on GitLab. You see the repository and the source code are here and you see that I just author change right now, just now. So on this repository, I also have a C I C D pipeline configured and for each commit the pipeline will run on the C two Mac instance running in the cloud. And you see here I have removed the gray background commit, which is there, and a pipeline that is currently running. So the pipeline has multiple tests, the steps, sorry, stage, the pre-built build, the test, the deployment, and the post-built. We are going to see each of these steps in detail. It takes seven to eight minutes roughly to finish. So while it's compiling and testing and everything, let's go into a bit of detail about what is this doing.

Guest: Seb

So it starts from the developer on the top left side. That was me changing the source code, committing and pushing the change to GitLab in the cloud. I have an easy two Mac instance and the easy two Mac instance as the GitLab agent installed. So the GitLab agent is pulling GitLab to wait for change and when there is a change in the source code, it starts to execute a pipeline. So a pipeline, it's a set of different steps and the first step for me is to prepare Amplify. That's very specific to amplify application. I need to pull the cloud configuration. Where is my endpoint for the API? What bucket should I use? What is the cognitive pool I should use? So that's one line on the common line just to pull the configuration from Amplify. The next thing that the script does to prepare the machine is to prepare the key chain.

Guest: Seb

The key chain is the secure database of macros that are used to keep your password. If you are using a Mac laptop, this is where Safari, for example, keeps your web password, but this is also where we put the key and the certificates that allow you to sign the application. Remember, if you want to distribute an application on the app store, you need to prove that it's you in the order of the app. And so you need to have a certificate and a signing key that you can buy from Apple. So preparing the key chain means getting the secret somewhere. And we are on AWS, so I'm using Secrets Manager, but you can use another source of secrets as well. [inaudible] store might be one of them. So I'm using Secret Manager to retrieve the certificate and the key that I received from Apple and put that in the kitchen so that later when my bill process will need the key and the certificate, it'll find it in the kitchen.

Guest: Seb

And earlier in this store in this show, I was talking about the things that Xcode does for you behind the scene that you don't even realize that's one of the things it does. But here I'm not using Xcode, at least not the graphical user interface of Xcode. So I need to process all the steps that Xcode graphical user interface is doing for me automatically. The rest is pretty straightforward. It's built. There is one common line to do that. It's called build. It'll your project and generate a binary. The next step is testing. And there are two different types of tests you can do. You run your unit test or you can run a full graphical user interface test with a script that simulates click and user interaction. You can do both on Amazon EC2 Mac, you can run the unit test in a simulator, and the graphical user interface test in a simulator as well.

Guest: Seb

Most of the time you want to test on the actual device as well. So I include into the demo something called Device Farm. Device Farm is enable service with actual devices and Android, iPhone, and web browsers as well where you can send your graphical user interface test script and these will be executed on real physical devices. And then as a developer, you download the logs of the test and the result of the test to know if the test succeeds or not. That part I skipped for the demo and I'm not sending the real testing script to a real physical device because it takes like 20, 25 minutes to complete the test and that's too long for this type of demo. And then the last step is to deploy. So I'm using the common line provided by Apple to upload my binary to Apple test flight.

Guest: Seb

Apple test flight will verify the binary and when the binary is okay, it'll distribute the binary automatically to all registered test flight users. So something you cannot see here on my phone is that I have the test flight application installed. I have two applications there, my getting started, the little yellow triangle and I have Chime because I'm one of the better testers of the mobile or chime applications as well. So this is the app that Apple will use to push the new version of my app. So I explain all that and you see that by the time I explain everything, everything happens there. I'm on the GitLab pipeline, I can follow the log and I can see that hey, the cleanup has been done and everything has been done. So if I switch to App Store Connect, which is the website that ever use to manage your application on the app store, and I reload this page, I should see yes, there is one additional build, it's in gray right now and it says processing.

Guest: Seb

So that's the build that you just received from my Amazon EC2Mac instance that upload that build. So how long it takes to process that on the upper website? I think it depends on the queue because sometimes it's like one minute, sometimes it might be 10 minutes, but whenever they will finish processing, they will push it to a test flight, and all registered users on their phone for that app on test flight will automatically receive the bill. So the bill will be downloaded and will be available in my app to test. Any questions so far, Jon? While we are waiting for Apple to process that binary? Yeah,

Host: Jon

So some clarification. Once Apple does its process and you said it's going to be pushed down all to devices, I see you have your phone connected to your laptop, but that's only for this. For you to connect the phone to the demo portion here, it's going to push it down wirelessly to all devices or do you have to enable or allow something to happen? No,

Guest: Seb

The cable was because I was trying to show you the screen of my phone on the screen for the demo, but I don't need the cable, so it'll be pushed by using the Wi-Fi from the phone.

Host: Jon

Okay. Once that happens, it'll automatically be updated. We can show everybody the changes that were made. And as Seb indicated, it does take about, I don't know, eight to 10 minutes depending on quickly Apple goes. This is not a limitation on a W s correct? You're just doing

Guest: Seb

Correct. No, no, the AWS part is finished now. Yep. The bill is done. The bill is signed, it has been sent to Apple for processing and the time it takes to process varies from one demo to the other.

Host: Jon

I remember the t flight, I was still around that. I used that for my application and how I built it. So it's nice to know that that hasn't changed except for somebody to get started. Why this is building, right? Say, man, I love this podcast, Sepp, how do I get started? How do I start? I want to start building an application. Should they try it, test it out locally or do you think it's efficient for enterprises to do it utilizing a w s? What is the scale of use cases from beginners to enterprises?

Guest: Seb

You talk about the CI/CD pipeline itself.

Host: Jon

Well actually just getting started building out applications.

Guest: Seb

Yeah, getting started, building iOS application first. It's really fun because it's a graphical application and you can change your code and see directly in Xcode how it behaves. So if I go back to my Xcode here, this little canvas as they call it, it's extremely reactive and you can assemble your user interface and see it working as you type, almost as you type. There are tons of resources. The best ones are on the Apple website, of course, developer apple.com to get started with the Swift programming language if you don't know Swift. And then with iOS Micros and iPad OS development. One of the rewarding things as well is that when you develop for iOS, everything you learn applies to iPad or watch, or TV o s. So you have the old Apple ecosystem there where you can distribute your application. The thing I show specifically on the build automation, it's not for beginners, it's more for either you have already an app live on the app store and you don't want to manually build, assemble, test, sign your application, and manage your build to the app store, connect to manually, and you want to automate that.

Guest: Seb

And of course for enterprise, if you have more than one iOS developer, at some point you will find benefits of automating your build and having a dedicated machine in the cloud or somewhere else, but a machine that assembles your code as the developers are making changes to the code.

Host: Jon

Nice. I think that's something as you want to grow and progress a little bit along where you want to automate the process, it's nice to kind of get started locally. You can build it on your laptop, a Mac mini that you have, but as you start to grow and you want to deploy out multiple of these, it's very efficient to kind of expand. And if you have other workers or helpers that want to kind of get in there and do the same thing, that'd be pretty awesome. Seven, it looks like it is completed. Yep,

Guest: Seb

Exactly. I was refreshing the page and here, I dunno if you see my phone is in Spanish, it's too long to explain, but you see the word ZA update next to the getting started application. So it means that the test flight knows a new version is available. So I can just click update in English and it should download the application and install the application for me automatically. And again, it might take a few seconds and here it's taking a bit longer than usual. So I still

Host: Jon

Have, of course, during demo time, right when we're trying to demo something out, that's usually when things take a little bit of time. We tried to hook up and get UHS a phone connected to do a screen share. It wasn't working but it was working earlier. Oh, there we go.

Guest: Seb

I opened the app and you see the gray background is not there anymore. The small one-nine change I did in Xco has been pushed automatically to my phone. And of course, it only applies to a test flight. So for better testing of the application, if you want to publish to the real app store for your real user, there is an additional step of verification from Apple that might take from a few hours to a few days, depending on their queue and depending on the complexity on your application as well.

Host: Jon

While this podcast isn't about the Apple QA process and getting an app on the store, it's about efficiently using the AWS Mac OS and creating a full-blown pipeline and farm available for all your application needs for the Mac app store while allowing you to grow. Seb, this has been awesome. Thank you.

Guest: Seb

I hope you learned something and that you learned something as well.

Host: Jon

I learned a lot. It brought me back to when I built my application and it kind of gets you itching to build another one. I took a couple of classes on it. I went into some live training. I was like, man, I want to build an app. The entire process is great to know getting started, doing it locally, growing, and expanding globally with W S's services on a dedicated host. We talked about some cost optimization efforts, including that these are available for savings plans. Seb, as I wrap things up, what do you want to leave with everybody?

Guest: Seb

Github.com/sto, S e b sto. And you will find the URL in the notes of this episode as well. This is the repo with all the source code, the source code of the app itself, but that's not very important. But also all the shell script that allows you to automate all these different steps. So it's a good starting point if you want to automate your build process yourself on Easy Two Mac or even on the Mac in the closet. It's the same shell script. It's just automation on microwaves.

Host: Jon

Everybody. I'm going to leave a link in the description below, except this is awesome that you kind of provided these getting-started steps for everybody. Let 'em play around with it, see what the possibilities are, and just grow from there.

Guest: Seb

Exactly. I have nothing. Could you summarize it perfectly well?

Host: Jon

As a principal developer advocate, Zeb usually has a lot to say, but on the other side of things, I hope I capture everything, Zeb, thank you so much for joining me.

Guest: Seb

Thank you for having me. And please leave your feedback, leave your comments. I will read them, and I will reply to them if a reply is necessary, but let us know what you think, how we can make that easier to consume or easier to use or to

Host: Jon

Understand. Awesome. Okay, everybody, the stork is a principal developer advocate at AWS. Today's topic was deploying your Mac in the cloud. My name's Jon Myer. Thank you for watching the Jon Myer podcast. Don't forget to hit that like subscribe, end, notify, because guess what, we're out of here.