hadoop部署技巧

Whether you are working on a personal project, collaborating with a couple people on an idea, or shipping production level code, deployment carries a inherit level of stress, anxiety, tricks, traps, bugs, errors, issues, landmines and nightmares that might be difficult to figure out if you don’t know what you’re looking for.

无论您是从事个人项目,还是与几个人合作进行构想,还是发布生产级别代码,部署都会带来压力,焦虑,窍门,陷阱,错误,错误,问题,地雷和噩梦的继承级别。如果您不知道要查找的内容,很难弄清楚。

With this blog I wanted to do something a little different and write about what I learned over the last 2 weeks from deploying my first React app called Spacebar Smasher.

通过这个博客,我想做些不同的事情,并写出我在部署第一个React应用程序Spacebar Smasher的过程中学到的东西

I am not going to focus on specific technical details for specific hosts or services, but more so on things to keep in mind before and after D-Day.

我将不着重于特定主机或服务的特定技术细节,而更多地关注D日前后的注意事项。

So, let’s get tipping.

所以,让我们给小费。

少行驶的路 (THE ROAD LESS TRAVELED)

First, some back story:

首先,一些背景故事:

I have developed a handful of websites since 2012, but they were all either brutally simple (My old graphic design portfolio is built using only HTML & CSS), or built with-built frameworks/templates (Ekklesia 360, myBB, vBulltein, etc…). So I never had any hands on experience with deploying a project of my own.

自2012年以来,我已经开发了一些网站,但是它们要么都非常简单(我的旧图形设计产品组合仅使用HTML和CSS构建),要么使用内置的框架/模板构建(Ekklesia 360,myBB,vBulltein等)。 )。 因此,我从来没有动手部署自己的项目的经验。

It wasn’t until 2 weeks ago when I finally deployed my first website built with React called Spacebar Smasher. In short, it’s a project where you press the space bar as many times as possible in 30 seconds, and try to get a high score.

直到2周前我终于部署了第一个用React构建的网站Spacebar Smasher 。 简而言之,这是一个项目,您在30秒内尽可能多地按空格键,然后尝试获得高分。

Simple, right?

简单吧?

I created the project with Jamal Farah while attending The Flatiron School, and we originally built it with vanilla JavaScript and Ruby On Rails. After graduating, I rebuilt the entire application with React, slapped on a fresh coat of paint, then rebuilt the backend with Firebase.

我在就读Flatiron学校时与Jamal Farah共同创建了这个项目,最初是使用香草JavaScript和Ruby On Rails构建的。 毕业后,我用React重建了整个应用程序,打上了一层新鲜的油漆,然后用Firebase重建了后端。

Why Firebase? Well, my webhost is a LAMP (Linux Apache MySQL PHP) stack. I have absolutely no experience with LAMP stacks. I REALLY wanted to deploy applications to my webhost since my graphic design portfolio is hosted there, and the few domains I own are registered with them as well. I also didn’t want to find a separate service to host the Ruby On Rails backend, and since Firebase starts out free, I figured I might as well try it out.

为什么选择Firebase? 好吧,我的网络主机是一个LAMP(Linux Apache MySQL PHP)堆栈。 我对LAMP堆栈没有任何经验。 我真的很想将应用程序部署到我的虚拟主机上,因为我的图形设计产品组合托管在该虚拟主机上,并且我拥有的几个域也已向它们注册。 我也不想找到一个单独的服务来托管Ruby On Rails后端,并且由于Firebase是免费启动的,所以我认为我也可以尝试一下。

Sure enough (after some sleepless nights), I figured out the majority of bugs, and can proudly say it all worked out in the end, and the entire experience proved to be invaluable.

果不其然(经过一夜不眠之后),我找出了大多数错误,并且可以自豪地说所有错误最终都解决了,整个经验被证明是无价的。

So, here is what I learned.

所以,这就是我学到的东西。

#1-人们会破坏您的项目 (#1 - People Will Break Your Project)

I sent Spacebar Smasher to a friend in Britain. Within 5 minutes, he had posted a score of 7348.

我将Spacebar Smasher发送给了一个英国的朋友。 在5分钟内,他的分数为7348。

“Hmmm,” I said to myself, “That would mean he was pressing the space bar 244 times per second.” Clearly, he figured out a way to cheat. I asked him to send me the script he ran. He laughed and said I was overthinking it. Turns out he used an auto clicker and set it to press the space bar once every millisecond.

我对自己说:“嗯,那意味着他每秒要按244次空格键。” 显然,他想出了一种作弊的方法。 我要求他将他运行的脚本发送给我。 他笑了,说我想得太多了。 原来,他使用了自动答题器,并将其设置为每毫秒按下一次空格键。

So, I immediately realized I need to figure out some anti-cheat measures. I setup a macro editor that comes with the software for my mouse (SteelSeries Rival 600) to emulate the same macro my friend used.

因此,我立即意识到我需要找出一些防作弊措施。 我为鼠标(SteelSeries Rival 600)安装了随软件附带的宏编辑器,以模拟我的朋友使用的相同宏。

I figured out that if I kept a running average of the amount of time between space bar presses, and if the running average consistently stayed below 0.01 seconds, they were probably cheating. I could then end the game, and have the application call the person a cheater.

我发现,如果我按空格键两次之间的运行时间的平均值,并且如果该平均值始终保持在0.01秒以下,则它们很可能在作弊。 然后,我可以结束游戏,并让应用程序将该人称为作弊者。

And it worked (so far). It effectively killed two birds with 1 stone for anyone running auto-clicker macros or writing scripts in Chrome.

并且有效(到目前为止)。 对于运行自动点击器宏或在Chrome中编写脚本的任何人,它有效地杀死了两只鸟,只用了一块石头。

Even if it is involuntary, people will break your project no matter what. Once you get to the point where you cannot find bugs in your project, start sending it around to people you know will provide feedback. Listen to their feedback and track the bugs they find. Fix those bugs. Don’t be afraid to ask people too many questions. Get as much information about the bug as possible. Think of it as a way to improve your project in ways you cannot do alone.

即使是非自愿的,无论如何人们都会破坏您的项目。 一旦到达无法在项目中找到错误的地步,就开始将其发送给您认识的人,他们将提供反馈。 听取他们的反馈并跟踪他们发现的错误。 修复这些错误。 不要害怕问别人太多问题。 获得有关该错误的尽可能多的信息。 可以将它视为无法独自完成的改进项目的一种方式。

No matter how small the vulnerability, plug the hole.

不管漏洞有多小,都要塞Kong。

#2-您对专案的意见将会改变 (#2 - Your Opinion of your Project Will Change)

Running and developing a project locally is much different that developing and deploying a project the entire internet can see. Your values change. The pressure you might feel to add small features, or fix small bugs will increase no matter the size of your user base. Every aspect of the project is amplified. This will change how you go about development and what goals you set for yourself.

在本地运行和开发项目与在整个互联网上可以看到的开发和部署项目有很大不同。 您的价值观改变了。 无论用户群的大小如何,您添加小功能或修复小错误可能会感到压力。 项目的各个方面都得到了放大。 这将改变您的发展方式以及为自己设定的目标。

The feedback you get from people will also shift how you view your own project even, if you try to not let it get to you. Focus on the positive more than the negative. Don’t let someone who doesn’t LOVE what you’ve deployed ruin your own perception of your application. If no one is using your application, that’s ok. Try sending it to more people. Link it on social media. Start adding SEO to pages.

即使您尝试不让别人得到您的反馈,也将改变您如何看待自己的项目。 专注于积极而不是消极。 不要让不喜欢您所部署内容的人破坏您对应用程序的看法。 如果没有人使用您的应用程序,那没关系。 尝试将其发送给更多人。 在社交媒体上链接它。 开始向页面添加SEO。

In the bubble that is your computer, your project is the best thing to ever be written. But after deployment, it becomes just another web page. That’s when you have to start treating it as one. Don’t let that stop you from loving what you deploy.

在您的计算机中,您的项目是有史以来最好的事情。 但是在部署之后,它就变成了另一个网页。 那是您必须开始将其视为一体的时候。 不要让这阻止您热爱所部署的内容。

#3-动员 (#3 - Mobilifcation)

Ensuring a positive UX is vital. One of the most common things I heard back from people when I first started sending out links to Spacebar Smasher, was that it doesn’t work on mobile. I would ask “What do you mean?” and they would reply with something like “There’s no way to press a space bar on my phone.”

确保良好的用户体验至关重要。 当我第一次开始向Spacebar Smasher发送链接时,我听到的最常见的事情之一是它在移动设备上不起作用。 我会问“你是什么意思?” 然后他们会回答“无法按我的手机上的空格键。”

That’s when I realized how important it is to facilitate mobile devices, and there really isn’t an option not to. I started crawling through some google searches and talking with some people to figure out a good solution.

从那时起,我意识到便利移动设备的重要性,而且确实没有不这样做的选择。 我开始通过一些Google搜索进行爬网,并与一些人交谈以找出一个好的解决方案。

One way to detect a mobile device is to set CSS properties depending on a browser’s max-width, min-width, max-height, or min-height with media queries.

检测移动设备的一种方法是根据媒体查询根据浏览器的max-widthmin-widthmax-heightmin-height设置CSS属性。

I felt that to be a clunky solution. The amount of media queries you write might get extremely long. Tablets might also have similar or larger resolutions than some laptops. Someone on a PC might have their window sized to something smaller than a large phone.

我觉得这是一个笨拙的解决方案。 您编写的媒体查询数量可能会非常长。 平板电脑的分辨率可能也比某些笔记本电脑更高。 PC上的某人的窗口大小可能会比大型电话小。

So I wanted to find a different solution. I had a hunch that mobile devices set properties in the browsers global execution context that a PC doesn’t. Specifically with touch screens.

所以我想找到一个不同的解决方案。 我有一种预感,移动设备会在浏览器的全局执行上下文中设置PC不会设置的属性。 特别是在触摸屏上。

If I could find a property in the browser’s window object that tells the browser that a device has a touch screen, I could add a button that allows mobile users to tap their screen instead of smash their space bar. I could make the button show up only for mobile devices, and change the name to Screen Smasher.

如果我可以在浏览器的窗口对象中找到一个告诉浏览器设备具有触摸屏的属性,则可以添加一个按钮,该按钮允许移动用户点击其屏幕而不是粉碎其空格键。 我可以使该按钮仅在移动设备上显示,然后将其名称更改为Screen Smasher。

I was right. Here is the abstract for the file:

我是对的。 这是文件的摘要:

You can add this to your React project, and import it as you normally would with any named import. It returns true if a user is on a mobile device, and false if they aren’t. It also works for tablets. Combined with state management, you can conditionally render whatever you want based off what device a user has. I have been using this file to set up 2 different layouts for desktop and mobile devices, and it has been working really well so far.

您可以将其添加到React项目中,然后像通常使用任何命名的import一样导入它。 如果用户在移动设备上,则返回true否则,则返回false 。 它也适用于平板电脑。 结合状态管理,您可以根据用户拥有的设备,有条件地呈现任何内容。 我一直在使用此文件为台式机和移动设备设置2种不同的布局,到目前为止,它的运行情况非常好。

But then I thought, “Well, what if someone is holding their phone sideways? Usually a web page or app will change it’s layout from portrait to landscape if they tilt their phone.”

但后来我想:“好吧,如果有人侧着手机,该怎么办? 通常,如果倾斜手机,网页或应用程序会将其布局从纵向更改为横向。”

That’s when I realized I had to come up with separate layouts for portrait and landscape screen orientations on mobile devices.

从那时起,我意识到我不得不为移动设备上的纵向和横向屏幕方向提出单独的布局。

Once again, after crawling through google, I found a solution that is specific to mobile devices:

再一次,通过谷歌爬网后,我发现了一个特定于移动设备的解决方案:

You can add this to your react project, and import it as you normally would with any other file as well. This returns the degrees at which a mobile device is turned: 0 degrees for portrait, or 90 degrees for landscape. Since 0 is a falsey statement, we can treat it as a boolean expression, and dynamically change the layout if someone tilts their phone.

您可以将其添加到您的react项目中,并像平常一样将其与任何其他文件一起导入。 return是移动设备的旋转角度:纵向为0度,横向为90度。 由于0是错误的陈述,因此我们可以将其视为boolean表达式,并在有人倾斜手机时动态更改布局。

You can also get really creative and change the layout as the phone is tilted, which can lead to some really cool CSS transitions between classes.

您还可以发挥真正的创造力,并随着手机倾斜而更改布局,这可能导致类之间的一些非常酷CSS过渡。

With a combination of both files, I have been able to set up 3 different layouts, and done a few iterations of the “mobilifcation” of Spacebar Smasher. I am still working on the implementation, but I am more than guilty of Feature Creep, and it has been something I keep pushing off on completing.

结合使用这两个文件,我能够设置3种不同的布局,并对Spacebar Smasher的“动员”进行了几次迭代。 我仍在进行实现,但是我对Feature Creep感到非常内,,这是我一直在努力完成的事情。

#4-创建用于测试的子域 (#4 - Create a Sub Domain For Testing)

Things that work locally don’t always work when deployed.

在本地工作的东西在部署后并不总是能工作。

After I finally got the first couple of versions deployed and working, I started refactoring things and making small additions. After one deployment, I completely broke everything. It took me a while to figure out it was a problem with one of the utility libraries I wrote for fetch requests. For the time that the problem existed, anyone who tried using my application would get a TypeError, and I had a few people tell me things were broken.

在我终于部署并使用了最初的几个版本之后,我开始进行重构和少量添加。 一次部署后,我彻底破坏了一切。 我花了一段时间才弄清楚这是我为fetch请求编写的实用程序库中的一个问题。 在存在问题的时间内,尝试使用我的应用程序的任何人都将收到TypeError ,并且我有几个人告诉我事情已损坏。

I felt like I was in tech support as I told people “Don’t worry, we are trying to fix it. We should have it back up and running within a few hours.”

我告诉别人:“别担心,我们正在尝试修复它。 我们应该在几个小时内将其备份并运行。”

That is when I created a sub domain to test any fixes I came up with before actually deploying them. After I fixed the problem, I started deploying new releases to the test domain first, and if everything worked properly, I would then deploy to the root domain. It prevented a lot of downtime when I ran into bugs with succeeding deployments.

那就是当我创建一个子域来测试我实际部署的所有修补程序之前。 解决问题后,我首先开始将新版本部署到测试域,如果一切正常,然后将其部署到根域。 当我在成功的部署中遇到错误时,它避免了很多停机时间。

Think of it as a development branch on GitHub. When working on a new feature, you make a pull request, work on stuff, then push to a development branch to make sure it works. If it does, you merge with the master branch.

将其视为GitHub上的开发分支。 使用新功能时,您需要发出拉取请求,处理内容,然后推送到开发分支以确保其正常工作。 如果是这样,则与master分支合并。

It’s the same thing, but with deployment.

这是同一件事,但是要进行部署。

#5-保存您部署的每个构建 (#5 - Save Each Build You Deploy)

Get into the habit of saving each build you deploy. This goes along with having development branches and creating a sub domain for testing. You have no control over whether or not your webhost goes down, loses all of the data on a server, or who knows what. Make sure you always have a backup.

养成保存部署的每个构建的习惯。 这与拥有开发分支并创建用于测试的子域一起。 您无法控制您的虚拟主机是否关闭,是否丢失服务器上的所有数据或谁知道什么。 确保您始终有备份。

It is always a good idea to have legacy versions of the code you write in case something catastrophic happens, even if it’s complied. Just like branches on Github. There are ways to edit compiled builds and run them locally in case of a disaster (even though it is kind of painful), and might prove essential in solving a problem when everything hits the fan.

最好保留编写的代码的旧版本,以防万一发生灾难性事件,即使它已被遵守。 就像Github上的分支一样。 有一些方法可以编辑已编译的构建,并在发生灾难时在本地运行它们(即使这很痛苦),并且可能在解决问题时证明是必不可少的。

#6-不要蠕变 (#6 - Don’t Feature Creep)

Feature Creep is when the scope of a project constantly gets larger and larger as it is being developed. So much so that completing everything you want to add to a project becomes impossible. I am very guilty of this.

Feature Creep是项目范围随着开发而不断扩大的时候。 如此之多,以至于无法完成要添加到项目中的所有内容。 我对此非常内。

Don’t do this. You will never feel any sort of accomplishment. You will never finish a project. Once a project is deployed, you might start brainstorming about what might be the next big thing to add to your project that will make it go viral. Pipedreaming is ok. But don’t mark it down as something that has to be done before you move on to something else.

不要这样 您将永远不会感到任何成就。 您将永远不会完成一个项目。 部署项目后,您可能会开始集思广益,以了解可能会增加到项目中的下一件大事,这将使它蓬勃发展。 做梦也可以。 但是,不要将其标记为必须继续进行其他操作之前要做的事情。

Keep your goals and wish lists realistic and manageable. Set an MVP every 2 weeks. Focus and organize your priorities on fixes or additions that will take no longer than a single day. Once you’ve worked through that list, focus on things that will take a few days. Then a week. Then two weeks. And so on. If you find a bug or glitch in the middle of working on something else, add it to the list, and keep focused on what you are doing. Fix the bug after you finish the task at hand. Do not try to tackle major refactors or additions before smaller tasks can be completed.

保持目标和愿望清单切合实际且易于管理。 每2周设置一次MVP。 将重点放在并安排您的优先事项,而这些工作不会超过一天。 处理完该列表后,请集中精力处理几天。 然后一个星期。 然后两个星期。 等等。 如果您在进行其他操作时发现错误或故障,请将其添加到列表中,并专注于正在做的事情。 完成手头的任务后,修复错误。 在完成较小的任务之前,请勿尝试解决主要的重构或增加的问题。

#7-修复您不想修复的问题 (#7 - Fix Things You Don’t Want To Fix)

Problems you might otherwise shrug off in local development will be reflected back at you by the people using your project. The feedback they provide will create a backlog of things to do. Things you don’t want to do.

您可能会在本地开发中忽略的问题将由使用您的项目的人反映给您。 他们提供的反馈将积压待办事项。 您不想做的事情。

Realize that it might be more important to fix a CORS issue than to add a new button on a landing page, even though fixing a CORS issue is not fun. It might be more important to spend a day and clean up the 1000's of lines of CSS you wrote instead of creating new art assets for header backgrounds.

请意识到,即使解决CORS问题并不有趣,但修复CORS问题可能比在目标网页上添加新按钮更为重要。 花一天时间清理您编写的1000行CSS而不是为页眉背景创建新的美术资产可能更重要。

You are going to have to do work you don’t want to do, and it might not be glamorous. It might kill your motivation. But it is more than worth it in the long run. The sense of accomplishment you gain from grinding through errors will make working on the things you want to work on that much sweeter.

您将不得不做您不想做的工作,这可能并不迷人。 它可能会扼杀您的动力。 但是从长远来看,这是值得的。 从错误中磨砺而获得的成就感将使您要从事的工作变得更加甜蜜。

#8-您无法修复所有错误 (#8 - You Can’t Fix All of The Bugs)

I am a recovering perfectionist. I want my projects to work 100% of the time all the time. I would rather have a project be simple and work flawlessly than have a project be complex and work half the time. I have trouble sleeping at night knowing there is a bug I can fix. I have trouble sleeping at night knowing there is a bug I can’t fix.

我是一个恢复中的完美主义者。 我希望我的项目始终都能100%正常工作。 我宁愿让一个项目简单而完美地工作,而不愿意让一个项目变得复杂并且半时地工作。 我知道我可以解决一个错误,因此我晚上难以入睡。 知道有一个我无法修复的错误,我在晚上无法入睡。

With that being said, there are some bugs/issues/errors that are outside of your control. It might not have anything to do with the code that you’ve written. When there are 5 or more browsers you need to accommodate for, and even more mobile devices, there is no way to make sure everything works on every device in every browser. That’s okay. Only do what you can.

话虽如此,有些错误/问题/错误不在您的控制范围内。 它可能与您编写的代码无关。 如果您需要容纳5个或更多浏览器,甚至更多的移动设备,则无法确保所有功能都可以在每个浏览器的每个设备上正常工作。 没关系。 只做你能做的。

On top of this, you will never have complete control over the server hosting your project (unless you are running the server yourself). There might be issues with your host that you cannot fix. Not because you don’t know how, but because you just can’t. You might not have root access. You might not be able to SSH to your host. Their server might be offline. Maybe they need to update their SSL certificates. And there’s nothing you can do about it.

最重要的是,您将永远无法完全控制托管项目的服务器(除非您自己运行服务器)。 主机可能存在无法修复的问题。 不是因为你不知道怎么做,而是因为你做不到。 您可能没有root访问权限。 您可能无法通过SSH连接到主机。 他们的服务器可能处于脱机状态。 也许他们需要更新其SSL证书。 而且您无能为力。

Be aware of this and accept the fact that you can’t fix everything. If a problem is out of your control, send a support ticket to your host, and hope for the best. If you can code around the problem, try to. If you can’t, find a new host.

请注意这一点,并接受您无法修复所有问题的事实。 如果您无法控制问题,请将支持票发送给您的房东,并希望最好的服务。 如果您可以解决此问题,请尝试。 如果无法找到新主机。

#9-保护您的项目 (#9 - Secure Your Project)

App security was something I brushed aside while attending The Flatiron School. I mean hey, in the bubble that is Flatiron, I generally didn’t have to worry about any malicious activity happening to my projects. Everything was on my laptop so unless someone stole my laptop, I didn’t have to worry about someone messing with the projects I worked on.

我在上Flatiron学校时忽略了应用程序安全性。 我的意思是,在Flatiron泡沫中,我通常不必担心我的项目中发生了任何恶意活动。 一切都在我的笔记本电脑上,因此除非有人偷了我的笔记本电脑,否则我不必担心有人会干扰我从事的项目。

This is where user authentication, form validation, and CORS kinda took a back seat. It simply wasn’t needed. It was taught, and we were expected to learn, but it was not needed.

这是用户身份验证,表单验证和CORS有点后退的地方。 根本不需要它。 它被教了,我们应该学习,但是不是必需的。

Then, during the project fair where I was showing off the first iteration of Spacebar Smasher with Jamal, a Software Engineering Coach came up to me and asked “Hey did you deploy this yet?” to which I replied, “No I don’t know how to.” He then said “Oh ok, cuz I really wanted to spam your backend with spoofed requests.” (He was one of the best coaches I had and wasn’t being malicious. He was messing with me, but definitely would have broken my project given the chance.)

然后,在我与Jamal展示Spacebar Smasher的第一个迭代的项目博览会期间,一位软件工程教练问我:“嘿,您部署了吗?” 我回答说:“不,我不知道该怎么做。” 然后他说:“哦,好吧,因为我真的想通过欺骗性请求向您的后端发送垃圾邮件。” (他是我拥有的最好的教练之一,并且没有恶意。他在和我搞混,但如果有机会,肯定会破坏我的项目。)

That’s when I realized I needed to take security seriously if I ever wanted to deploy anything.

从那时起,我意识到如果我想部署任何东西,就需要认真对待安全性。

Security is not an issue in a local environment. You are the only person connecting and using your project. But when you cast it into the deep ocean of the internet, that completely changes.

在本地环境中,安全性不是问题。 您是唯一连接和使用您的项目的人。 但是,当您将其投放到互联网的深海中时,情况就完全改变了。

Make sure people can’t spam your database with requests. Make sure users can’t send requests without credentials. Make sure the requests you are legitimately sending can’t be tampered with. Make sure people can’t send requests to your backend from URLs they’re not supposed to. MAKE FRIENDS WITH CORS.

确保人们不能通过请求向您的数据库发送垃圾邮件。 确保用户没有凭据就无法发送请求。 确保您合法发送的请求不会被篡改。 确保人们无法从他们不该发送的网址向您的后端发送请求。 与朋友结识。

Think about each way your frontend and backend are interacting with each other, and how someone might screw with the data is being sent. Don’t allow special characters in forms. Don’t allow empty fields. Set limits to value lengths.

考虑一下您的前端和后端相互交互的每种方式,以及有人可能如何处理数据。 请勿在表单中使用特殊字符。 不允许有空字段。 为值长度设置限制。

This all goes along with the first tip that people will break your project whether they are trying to or not. It might start to soak up a lot of your development time, to a point where that’s all you work on for weeks on end. But making sure other people can’t screw with your project is something you want to be proactive about.

所有这些都伴随着第一个技巧,即人们无论是否尝试都将破坏您的项目。 它可能会开始占用您大量的开发时间,以至于您花了数周时间才能完成所有工作。 但是要确保其他人不能跟上您的项目的步伐。

Don’t address security issues once it becomes problem. Address them before they become a problem.

一旦出现安全问题,请不要解决。 在它们成为问题之前解决它们。

#10-不要害怕部署 (#10 - Don’t Be Afraid To Deploy)

I held off on deploying anything until 4 months after graduating because I was afraid to. I knew it was a big can of worms, and I didn’t know if I was ready for it.

直到毕业后4个月,我才推迟部署任何东西,因为我害怕这样做。 我知道那是一大罐蠕虫,而且我不知道我是否准备好了。

Don’t be afraid. Start out by building a really basic test project that does nothing more than CRUD operations. Try deploying that. Get that working, and slowly scale the project up as you’re deploying it. Go step by step. Don’t try taking the plunge all at once and deploy a huge project.

不要害怕 首先构建一个真正的基本测试项目,该项目仅执行CRUD操作。 尝试部署它。 使该工作正常进行,并在部署项目时逐步扩大项目规模。 一步一步走。 不要尝试一次全力以赴,然后部署一个庞大的项目。

Break each part of your test project into small pieces and focus on getting those small pieces working. This way, you aren’t destroying or breaking anything you’ve already built, while still gaining the experience needed to deploy a project you really care about.

将测试项目的每个部分分成小部分,并专注于使这些小部分正常工作。 这样,您就不会破坏或破坏已经构建的任何内容,同时还能获得部署您真正关心的项目所需的经验。

Scale your test project up until it is equal to the project you want to deploy. Then, when you feel comfortable, deploy the project that matters. That is what I did. It made deploying Spacebar Smasher much easier. That’s also what I am doing now. My keystone project for Flatiron, called SmartApp, is FAR more complex than Spacebar Smasher. After I complete the majority of work I have planned for Spacebar Smasher, I am going to set up another intermittent test project to work on all the things I am going to have to do for Smart App.

扩展测试项目,直到它等于您要部署的项目为止。 然后,当您感到舒适时,部署重要的项目。 那就是我所做的。 它使部署Spacebar Smasher变得更加容易。 这也是我现在正在做的。 我对Flatiron的主要项目SmartApp远比Spacebar Smasher复杂。 完成我为Spacebar Smasher计划的大部分工作之后,我将建立另一个间歇性测试项目,以处理我将要为Smart App做的所有事情。

It’s like the old analogy of trying to boil a frog in a pot of water. You don’t boil the water first, then put the frog in the boiling pot of water. He will immediately jump out. Instead, put the frog in the pot of water first, then slowly boil it while he is in it.

这就像古老的比喻,试图在一锅水里煮青蛙。 您不必先将水煮沸,然后再将青蛙放在沸腾的水里。 他会立即跳出来。 取而代之的是,先将青蛙放入水锅中,然后在青蛙在锅中慢慢煮沸。

Then put the lid on the pot of water before he jumps out.

然后盖上锅盖,然后他跳出来。

任务完成 (MISSION COMPLETE)

So those are all my tips.

这些都是我的提示。

Some of them might seem like common knowledge, but the goal of this blog is to try and help those who are still at a bootcamp, or those who have never deployed a project before.

其中一些可能看起来像是常识,但是此Blog的目的是尝试帮助仍在训练营中的人员或从未部署过项目的人员。

I wish I had some more specific technical tips for mainstream hosts, or could write a step by step tutorial on deployment, but I get the feeling that the way I deploy to my webhost is probably irrelevant for someone looking to use heroku or git pages.

我希望我对主流主机有一些更具体的技术提示,或者可以编写有关部署的分步教程,但是我感到,对于希望使用heroku或git页面的人来说,部署到Web主机的方式可能无关紧要。

Either way, I hope you got some useful information out of this blog and it helps make a project you are trying to deploy a little less painful.

无论哪种方式,我都希望您能从此博客中获得一些有用的信息,并且这有助于使您尝试部署的项目不那么痛苦。

May all your functions return true, and all your requests respond with 200.

可能您的所有函数都返回true,并且您的所有请求均返回200。

Stay safe…stay healthy…and keep fighting the good fight.

保持安全……保持健康……并继续打好仗。

BTW, if you do check out Spacebar Smasher and have any problems with it, feel free to reach out and let me know.

顺便说一句,如果您确实检查出Spacebar Smasher并遇到任何问题,请随时与我们联系。

翻译自: https://levelup.gitconnected.com/top-10-tips-i-learned-from-deployment-1a8db769715b

hadoop部署技巧


http://www.taodudu.cc/news/show-5248510.html

相关文章:

  • js 监听键盘事件
  • linux shell 之结构化语法
  • oracle 字符去除空格,oracle消除字符串空格 | 学步园
  • DELL Precision Tower7910重装系统+开机出现GRUB界面如何处理
  • 跨平台C/C++开发软件CLion使用教程:入门指南(二)
  • Blender2.9-keymap
  • Linux-Vi编辑器
  • macOS平铺窗口yabai配置分享
  • C++ Qt Game Tutorial 3 - Shooting With the Spacebar
  • [Android实例] 两边都能滑动的数据间隔选择SpaceBar
  • macOS spacebar安装笔记
  • DDD洋葱架构才是 yyds,阿里架构师手记(DDD)领域驱动设计应对之道
  • DDD 洋葱架构才是 yyds!阿里大牛手记(DDD)领域驱动设计应对之道
  • 思辨领域模型-- DDD≠数据库关系模型
  • 谈一谈DDD面向领域编程
  • DDD领域驱动设计实战 - 创建实体身份标识的常用策略
  • 一文带你学习DDD,基础入门篇
  • Fedora 14 安装 DDD过程
  • composer 多版本切换
  • 环境变量 composer
  • 什么是composer
  • python 如何控制鼠标键盘
  • 优秀软件体验2
  • 适合程序员的理财方式
  • 毕业设计-----个人理财app的设计与实现效果展示
  • 精密空调的调试
  • 云呐|精密空调通讯故障报警,空调报通讯故障是什么问题?
  • 竣达技术丨中小机房远程网络在线动环监控方案
  • 连锁门店设备微信云集中监控及告警方案
  • 解决xpath提取不规则网页的问题

hadoop部署技巧_我从部署中学到的十大技巧相关推荐

  1. 短线王的盯盘宝怎么样_短线王炒股十大技巧!

    原标题:短线王炒股十大技巧! 散户的资金量特别少,所以散户们喜欢炒短线,但是炒短线的散户经常赔钱,不过看了下面十大技巧,散户再也不怕短线炒股赔钱了. 一.追涨杀跌有时用处很大.强者恒强,弱者恒弱.炒股 ...

  2. 苹果12开发者设置_苹果12怎么省电?iPhone12系列省电设置十大技巧介绍

    阅读本文前,请您先点击上面的"蓝色字体",再点击"关注",这样您就可以继续免费收到文章了.每天都会有分享,都是免费订阅,请您放心关注.注图文来源网络,侵删 大家 ...

  3. 苹果12开发者设置_苹果12怎么省电?iPhone12系列省电设置十大技巧介绍_苹果知识...

    大家都知道,今年iPhone12的性能相比上一代11更强,但是电池配置却变小了,这让很多果粉甚是纠结,在续航不佳的前提下,我们只有通过一些省电设置,才能让iPhone12系列有更好的续航能力.接下来, ...

  4. Spark+Alluxio性能调优十大技巧

    戳蓝字"CSDN云计算"关注我们哦! 由于统一访问对象存储(如S3)和HDFS数据的场景的出现和普及,Apache Spark结合Alluxio的大数据栈越来越受欢迎.此外,越来越 ...

  5. jQuery Mobile高手必备的十大技巧和代码片段

    本文转自51ito布加迪编译版本: http://mobile.51cto.com/hot-276160.htm 其中未发现英文原作链接,为尊重版权,google之后附上: http://www.we ...

  6. 创建一个Flash站点的十大技巧

    根据Macromedia 顶级Flash设计者,开发者以及可用性专家的建议,我们收集了创建一个具备可用性的Macromedia Flash站点的十大技巧. 1.记住用户的目标 用户往往带着目的访问一个 ...

  7. 谷歌浏览器设置请求头_2020年 谷歌SEO优化 十大技巧(四)

    本篇是2020年谷歌SEO优化十大技巧的第4篇文章,在前面的三篇文章中 2020年 谷歌SEO 优化十大技巧(一) --- Jack外贸建站 谷歌SEO 优化教程 主要讲的是页面的标题和关键词的优化研 ...

  8. 跟柴静的《穹顶之下》学习演讲的十大技巧

    跟柴静的<穹顶之下>学习演讲的十大技巧 柴静是如何用一次演讲感召了全国三亿人!她的演讲中又有哪些秘密呢?今天就跟小编一起来看!免费关注微信公众号 jiarenorg ,就能天天收到佳人精彩 ...

  9. 给大家盘点一下最新版本的Photoshop十大技巧和黑科技

    自Photoshop诞生至今已经接近30年了,这几年特别是2017年以来Photoshop更新非常频繁,加入了人工智能技术之后Photoshop如虎添翼,今天就给大家盘点一下最新版本的Photosho ...

最新文章

  1. think PHP全栈开发教程,【Thinkphp教程】模板中使用函数
  2. python 列表拼接_【Python杂货铺】速学python基础
  3. wimbuilder2教程_Wimbuilder WIN10XPE制作所需的工程文件
  4. 在GNS3中使用SecureCRT6.1出错的解决方案
  5. kafka学习笔记一
  6. wordpress禁止恶意HTTP_USER_AGENT
  7. vue 识别身份证内容并映射到来源地区的js
  8. [机器学习入门笔记] 2. 2022吴恩达机器学习Deeplearning.ai课程(回顾)
  9. html一键生成海报,微海报在线制作一键生成方法
  10. 设置个性桌面计算机教案,第十三课《个性化的桌面设置》教学设计
  11. 数据科学之 如何找到指标的最 佳分裂点的几个想法
  12. 王者荣耀android换ios,2021王者荣耀安卓账号可以转苹果吗 2021年安卓账号转移到ios方法...
  13. python基础学习与应用
  14. python无法安装tensorflow_Windows上安装Tensorflow踩的坑
  15. 2D卷积与3D卷积的区别
  16. 微信转账2020假图片_2020新版微信头像下载-2020新版微信头像图片大全 v7.0.20
  17. 如何分析公众号后台数据?
  18. 全球与中国轴向活塞液压马达和泵市场深度研究分析报告
  19. OJ每日一练——闰年
  20. 【2021最新版】ZooKeeper面试题总结(49道题含答案解析)

热门文章

  1. 逛飙极兔牵手百世,快递行业三分江湖
  2. 2023深圳智慧医疗展览会
  3. 2020年低压电工考试内容及低压电工考试平台
  4. java枚举类型enum用法_深入理解java枚举类型enum用法
  5. 欺骗无数人眼睛的Magic Leap亮出真本事!公布AR系统路线和16项Demo
  6. 百度和亚马逊拍了“同一支”宣传片
  7. js文件\u开头的编码原来是unicode编码
  8. 成品app直播源码,iOS键盘弹出遮挡输入框
  9. ecos 自带的Microwindows中加入mwin的支持
  10. html5怎么调夜间模式,保护眼睛,开启浏览器的夜间模式