English 中文(简体)
为什么没有在现场服务器上主办编辑?
原标题:What are the reasons for not hosting a compiler on a live server?

在我目前工作的地方,我们就向生产服务器部署我们的“灰色”代码进行了小型辩论。 我投票利用<代码>pip安装——r requirements.txt,在服务器上建立双亲附属公司(如平板车司机)。 这迅速遭到否决,没有更好的解释,即“我们不把汇编者放在活服务器上”。 因此,我们的部署进程变得错综复杂,只是为了避免这一汇编步骤。

我的问题是: 为什么这些日子要避免把编辑放在活服务器上?

最佳回答

In general, the prevailing wisdom on servers installs is that they should be as stripped-down as possible. There are a few motivations for this, but they don t really apply all that directly to your question about a compiler:

  • Minimize resource usage. GCC might take up a little extra disk space, but probably not enough to matter - and it won t be running most of the time, so CPU/memory usage isn t a big concern.
  • Minimize complexity. Building on your server might add a few more failure modes to your build process (if you build elsewhere, then at least you will notice something wrong before you go mess with your production server), but otherwise, it won t get in the way.
  • Minimize attack surface. As others have pointed out, by the time an attacker can make use of a compiler, you re probably already screwed..

在我公司,如果汇编者安装在我们服务器上,我们一般不会过于谨慎,但出于某种不同的原因,我们也在我们的服务器上安装never<>>>>>>>> >pip。 我们不关心一揽子计划的建立,而是何时和如何下载。

我们当中特别幸运的是,在没有任何认证形式的情况下(无特别安全法,没有包裹签名,......) pip(而且很容易——install)将安装从PYPI的包裹。 此外,其中许多草原实际上在PYPI上任;管道和轻松接线。 因此,这里有两个问题:

  • If pypi - or any of the other sites on which your dependencies are hosted - goes down, then your build process will fail
  • If an attacker somehow manages to perform a man-in-the-middle attack against your server as it s attempting to download a dependency package, then he ll be able to insert malicious code into the download

因此,当我们首先增加依赖性时,我们就下载一揽子计划,尽最大努力确保来源是真实的(这并非无proof可击),并将它们纳入我们自己的版本控制系统。 我们确实在一个单独的建筑服务器上建立我们的一揽子计划,但这一点并不重要;我们只是认为,建立一个我们能够迅速部署到多种情况的双双轨一揽子计划是有益的。

问题回答

这将给服务器带来沉重的压力?





相关问题
Can Django models use MySQL functions?

Is there a way to force Django models to pass a field to a MySQL function every time the model data is read or loaded? To clarify what I mean in SQL, I want the Django model to produce something like ...

An enterprise scheduler for python (like quartz)

I am looking for an enterprise tasks scheduler for python, like quartz is for Java. Requirements: Persistent: if the process restarts or the machine restarts, then all the jobs must stay there and ...

How to remove unique, then duplicate dictionaries in a list?

Given the following list that contains some duplicate and some unique dictionaries, what is the best method to remove unique dictionaries first, then reduce the duplicate dictionaries to single ...

What is suggested seed value to use with random.seed()?

Simple enough question: I m using python random module to generate random integers. I want to know what is the suggested value to use with the random.seed() function? Currently I am letting this ...

How can I make the PyDev editor selectively ignore errors?

I m using PyDev under Eclipse to write some Jython code. I ve got numerous instances where I need to do something like this: import com.work.project.component.client.Interface.ISubInterface as ...

How do I profile `paster serve` s startup time?

Python s paster serve app.ini is taking longer than I would like to be ready for the first request. I know how to profile requests with middleware, but how do I profile the initialization time? I ...

Pragmatically adding give-aways/freebies to an online store

Our business currently has an online store and recently we ve been offering free specials to our customers. Right now, we simply display the special and give the buyer a notice stating we will add the ...

Converting Dictionary to List? [duplicate]

I m trying to convert a Python dictionary into a Python list, in order to perform some calculations. #My dictionary dict = {} dict[ Capital ]="London" dict[ Food ]="Fish&Chips" dict[ 2012 ]="...