fabric

离线安装和实例化fabric java chaincode

醉酒当歌 提交于 2020-01-06 21:52:09
离线安装和实例化fabric java chaincode 需求 hyperledger fabric由于其本身的特性,目前主要应用于大型国企和银行,其环境的部署一般是与外部网络隔离的。如果采用docker的部署方式,docker镜像可以通过导入即可,但是在安装和实例化的时候需要下载相应的依赖,而且在1.4的环境中,fabric实例化链码需要使用到shadowJar插件。 解决方案 目前网上能找到的解决方案是修改javaenv镜像的dockerfile,将shadowJar插件的依赖直接在生成javaenv镜像文件的时候加载。我在测试这种方法的时候发现在重新生成javaenv镜像文件的时候会缺少一些文件,导致生成的镜像不可用。 参考文章地址: http://www.bubuko.com/infodetail-3024199.html 于是我决定直接将所有的依赖copy到项目目录下: build.gradle 文件内容: plugins { id 'com.github.johnrengelman.shadow' version '2.0.3' id 'java' } group 'org.hyperledger.fabric-chaincode-java' version '1.0-SNAPSHOT' sourceCompatibility = 1.8 repositories {

Check If Path Exists Using Fabric

倾然丶 夕夏残阳落幕 提交于 2020-01-02 03:43:05
问题 I am running this code to check whether this directory exists on remote machine or not but this code is checking for the directory on local machine. How can I verify directory on remote machine? rom fabric.api import run, sudo, env import os env.hosts = ['remote_server'] env.user = 'ubuntu' env.key_filename = '/home/ubuntu/ubuntu16-multi.pem' def Directory_Check(): DIR_1="/home/ubuntu/test-dir" if os.path.exists(DIR_1): print "Directory Exist!" else: print "Directory Does Not Exist!" 回答1: You

Insert git revision number into files during deployment

不羁岁月 提交于 2020-01-02 00:51:09
问题 What I'm doing I think should be fairly simple, but I can't seem to figure out how to make it work. I want to embed a unique version number in html and javascript files, for two reasons. The first reason is that I want to ensure that when the javascript file is loaded, the system doesn't attempt to use the cache if there is a new version, but if I could call it using something like <script src="/app.js?v1.0.1-1-95425234"></script> I could almost certainly ensure this never happens. The second

Local setting for INSTALLED_APPS using Fabric

痴心易碎 提交于 2020-01-01 10:27:29
问题 I have an app(django-compressor) that I only want to run on my local machine and not the server. I know about the try: from local_settings import * except ImportError: pass trick. But I was wondering if there was a better way to remove the app I only want run locally from the INSTALLED_APPS in the settings.py using Fabric. 回答1: I think the standard approach you mentioned is best; create a folder settings with three settings files; shared.py , production.py and development.py . Settings that

fabric vs pexpect

让人想犯罪 __ 提交于 2020-01-01 01:53:14
问题 I've stumbled upon pexpect and my impression is that it looks roughly similar to fabric. I've tried to find some comparison, without success, so I'm asking here--in case someone has experience with both tools. Is my impression (that they are roughly equivalent) correct, or it's just how it looks on the surface ? 回答1: I've used both. Fabric is more high level than pexpect, and IMHO a lot better. It depends what you're using it for, but if your use is deployment and configuration of software

Tungsten Fabric架构解析丨详解vRouter体系结构

谁说胖子不能爱 提交于 2019-12-31 21:53:22
Hi!欢迎来到Tungsten Fabric架构解析内容的第三篇,本文将详细介绍Tungsten Fabric vRouter的体系结构。 Tungsten Fabric架构解析系列文章,由TF中文社区为你呈现,旨在帮助初入TF社区的朋友答疑解惑。我们将系统介绍TF有哪些特点、如何运作、如何收集/分析/部署、如何编排、如何连接到物理网络等话题。 先来看一张Tungsten Fabric vRouter功能组件的概念视图。 vRouter代理在主机操作系统的用户空间中运行,而转发器可以是内核模块,在使用DPDK时在用户空间中运行,或者在可编程网络接口卡(也称为“智能NIC”)中运行。这些选项在后续文章中有更详细的描述,这里说明了更常用的内核模块模式。 代理与控制器保持会话,并发送其需要的VRF、路由和访问控制列表(ACL)的信息。代理将信息存储在自己的数据库中,并使用该信息配置转发器。接口连接到VRF,每个VRF中的转发信息库(FIB)都配置有转发条目。 每个VRF都有自己的转发表和流表,然而MPLS和VXLAN表在vRouter中是全局的。转发表包含目的地的IP和MAC地址的路由,并且IP到MAC关联用于提供代理ARP功能。当VM接口启动时,vRouter选择MPLS表中的标签值,并且这些值仅对该vRouter本地有效。 在一个Tungsten Fabric域内

集智全球开源 聚合中国力量Tungsten Fabric中文社区成立大会暨社区第一次全员大会成功举行

一世执手 提交于 2019-12-31 21:53:14
开源的种子正在世界范围内生根发芽,在中国的发展尤其快速。11月7日,美丽的黄海之滨见证了中国开源云网络的历史性一页——Tungsten Fabric中文社区正式启动,并召开第一次全员大会,43家创始会员代表与两百多位技术爱好者出席。 Tungsten Fabric中文社区创始会员在启动仪式上 开源网络大势所趋 “混合云和多云架构,包括软件定义网络的应用,已经是非常明确的技术潮流。我们还要抓紧时间,在新的领域不断取得突破。在这样的时代背景下,专门成立一个中文的开源云网络社区,我觉得非常及时和有必要。” 中国工程院院士倪光南特别向大会发来了贺信,为Tungsten Fabric建立中文社区的做法点赞,同时也期待中文社区能跑得更快,把顶尖的技术和专家资源加速引进来,同时带着中国用户的实践经验,带着中国技术研发的创新成果,跑到全球社区的前面去,引领多云网络领域的国际合作。 中国工程院院士倪光南发来亲笔贺信 “5G的发展,移动通信技术的变化,事实上倒逼了核心网的改造。” 中国联通首席科学家谢朝阳认为:“多云管理至为重要,其中最难的地方是网络。因云计算产生的虚拟网络带来了重新构架的机会,所以做多云网络管理的时候,既要兼顾原有的架构,又要兼顾新的架构。当前的状态是网络缺少一个操作系统,如果TF社区做大了,它可以成为网络操作系统之一。” 中国联通首席科学家谢朝阳 TungstenFabric—

Python Fabric: Skip logins needing passwords

荒凉一梦 提交于 2019-12-31 03:08:05
问题 I have a similar issue to this: How can I skip Fabric connections that ask for a password? which has no answer. I'm looking for a way to get Fabric to consider bad any host asking for a password instead of an SSH key login, since this means the user I'm connecting as doesn't have an account on the server (and I'm iterating through a large list of hosts). I've tried setting env.password = None and env.password = 'none' as well as with setting(warn_only=True): but Fabric keeps asking for the

How to set environment variables using Fabric

风格不统一 提交于 2019-12-30 17:06:48
问题 I have a local development environment that relies heavily on system environment variables (it follows the Heroku 12-factor app model), and I currently set these using a shell script. The shell script also sets up git remotes, and activates the virtualenv environment, and I'd like, if possible, to move all this to a Fabric command (or series of commands), as we are using Fabric for a bunch of other stuff, and I'd like to retire the shell scripts. Running local('export FOO=bar') doesn't work:

How can I properly set the `env.hosts` in a function in my Python Fabric `fabfile.py`?

故事扮演 提交于 2019-12-30 08:22:46
问题 When I run this fabfile.py ... from fabric.api import env, run, local, cd def setenv(foo): env.hosts = ['myhost'] def mycmd(foo): setenv(foo) print(env.hosts) run('ls') with this command fab mycmd:bar . I get this output... ['myhost'] No hosts found. Please specify (single) host string for connection: What, what?! I don't get it? I've set the env.hosts and it seems to be valid "inside" the mycmd function, but for some reason that run command doesn't know about the hosts I've specified. Color