我正在从物理机器到ec2实例进行大规模迁移.
截至目前,我有3个x.large节点,每个节点有4个实例存储驱动器(raid-0 1.6TB).在我这样设置之后,我记得"实例存储卷上的数据仅在关联的Amazon EC2实例的生命周期内持续存在;如果停止或终止实例,实例存储卷上的任何数据都将丢失."
人们通常在这种情况下做什么?我担心,如果其中一个盒子崩溃,那么如果不是100%在另一个盒子上复制,那么所有数据都将在该盒子上丢失.
http://www.hulen.com/?p=326 我在上面的链接中读到这些人使用ephermal驱动器并使用EBS驱动器和快照定期备份内容."
在这里的这个问题:我如何备份aws ec2实例/临时存储? 人们声称您无法将ephermal数据备份到EBS快照上.
我最好选择使用几个EBS驱动器并将它们组合在一起并能够直接从它们拍摄快照吗?我知道这可能是最昂贵的解决方案,但它似乎最有意义.
任何信息都会很棒.
感谢您的时间.
我正在使用virtualenv进行django设置.我正在尝试构建一个视图,从日志中提取数据,然后绘制数据图.最终我想拥有这个实时和现场.如果您对其他最适合我项目的解决方案有任何建议,请不要犹豫,将它们包含在下面的评论栏中.
我试图使用pip install matplotlib从pip安装matplotlib.
我收到以下消息:
* The following required packages can not be built:
* freetype
Run Code Online (Sandbox Code Playgroud)
然后我验证它已安装
yum install freetype
Package freetype-2.3.11-14.el6_3.1.x86_64 already installed and latest version
Run Code Online (Sandbox Code Playgroud)
然后我发现有一个python-matplotlib是旧版本.99.但是,我希望将其保留在虚拟环境中而不是系统范围内.
find / -name *freetype*
/var/lib/yum/yumdb/f/d2807dcfe3762c0b9f8ef1d9bf0f05788e73282a-freetype-2.3.11-14.el6_3.1- x86_64
/usr/lib64/libfreetype.so.6.3.22
/usr/lib64/libfreetype.so.6
/usr/share/doc/freetype-2.3.11
Run Code Online (Sandbox Code Playgroud)
我搜索了遍布stackoverflow,只看到了ubuntu的解决方案,没有转移到centos.
谢谢你的时间,约翰
下面的教程(https://github.com/agiliq/django-graphos)和这个stackoverflow文章(使用Django-graphos显示图形)我无法获得任何数据发布到我的模板.
models.py
class MonthlyWeatherByCity(models.Model):
month = models.IntegerField()
boston_temp = models.DecimalField(max_digits=5, decimal_places=1)
houston_temp = models.DecimalField(max_digits=5, decimal_places=1)
class Meta:
verbose_name_plural = "Monthly Weather By Cities"
def __unicode__(self):
return unicode(self.month)
Run Code Online (Sandbox Code Playgroud)
views.py
from graphos.sources.model import ModelDataSource
from graphos.renderers import flot
from portal.models import MonthlyWeatherByCity
def graph_test(request):
queryset = MonthlyWeatherByCity.objects.all()
data_source = ModelDataSource(queryset, fields=['boston_temp', 'houston_temp'])
chart = flot.LineChart(data_source, options={'title': "Website", 'xaxis': {'mode': "categories"}})
return render_to_response('portal/index.html', {'chart': chart})
Run Code Online (Sandbox Code Playgroud)
index.html - 图表无显示任何内容.
{% extends 'portal/base.html' %}
{% load static %}
{% block head …Run Code Online (Sandbox Code Playgroud) 如果嵌套字典前面没有键,我目前能够删除重复项。我使用此函数的字典列表的一个示例是:
[{'asndb_prefix': '164.39.xxx.0/17',
'cidr': '164.39.xxx.0/17',
'cymru_asn': 'XXX',
'cymru_country': 'GB',
'cymru_owner': 'XXX , GB',
'cymru_prefix': '164.39.xxx.0/17',
'ips': ['164.39.xxx.xxx'],
'network_id': '164.39.xxx.xxx/24',},
{'asndb_prefix': '54.192.xxx.xxx/16',
'cidr': '54.192.0.0/16',
'cymru_asn': '16509',
'cymru_country': 'US',
'cymru_owner': 'AMAZON-02 - Amazon.com, Inc., US',
'cymru_prefix': '54.192.144.0/22',
'ips': ['54.192.xxx.xxx', '54.192.xxx.xxx'],
'network_id': '54.192.xxx.xxx/24',
}]
def remove_dict_duplicates(list_of_dicts):
"""
"" Remove duplicates in dict
"""
list_of_dicts = [dict(t) for t in set([tuple(d.items()) for d in list_of_dicts])]
# remove the {} before and after - not sure why these are placed as
# the first and …Run Code Online (Sandbox Code Playgroud) django ×2
python ×2
amazon-ec2 ×1
cassandra ×1
centos ×1
dictionary ×1
flot ×1
freetype ×1
graph ×1
matplotlib ×1
storage ×1
virtualenv ×1