有人可以清楚地向我解释AWS CLI Cloudformation create-stack和deploy命令之间的区别和优先级吗?对我来说,似乎他们做同样的事情并部署资源.
为什么当您从cli运行deploy命令时,create stack没有可执行的更改集,而文档说:
通过创建并执行更改集来部署指定的AWS CloudFormation模板.AWS CloudFormation执行更改集后,该命令将终止.如果要在AWS CloudFormation执行更改集之前查看更改集,请使用--no-execute-changeset标志.
我使用的是 macOS Big Sur 11.0.1。
我正在设置一个virtual env
$python3 -m venv $my_workdir)/.virtualenv
Run Code Online (Sandbox Code Playgroud)
但在构建wheel包时出现此错误:
building '_openssl' extension
creating build/temp.macosx-10.14.6-x86_64-3.8/build
creating build/temp.macosx-10.14.6-x86_64-3.8/build/temp.macosx-10.14.6-x86_64-3.8
clang -Wno-unused-result -Wsign-compare -Wunreachable-code -fno-common -dynamic -DNDEBUG -g -fwrapv -O3 -Wall -iwithsysroot/System/Library/Frameworks/System.framework/PrivateHeaders -iwithsysroot/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/Headers -arch arm64 -arch x86_64 -I/usr/local/opt/gettext/include -I/Users/engontang/devspace/energisme/terraform/tfwrapper-infra-pda/.wrapper/.virtualenv/include -I/Applications/Xcode.app/Contents/Developer/Library/Frameworks/Python3.framework/Versions/3.8/include/python3.8 -c build/temp.macosx-10.14.6-x86_64-3.8/_openssl.c -o build/temp.macosx-10.14.6-x86_64-3.8/build/temp.macosx-10.14.6-x86_64-3.8/_openssl.o -Wconversion -Wno-error=sign-conversion
build/temp.macosx-10.14.6-x86_64-3.8/_openssl.c:575:10: fatal error: 'openssl/opensslv.h' file not found
#include <openssl/opensslv.h>
^~~~~~~~~~~~~~~~~~~~
1 error generated.
error: command 'clang' failed with exit status 1
----------------------------------------
ERROR: Failed building wheel for cryptography
Building wheel for pynacl …Run Code Online (Sandbox Code Playgroud) 我想设置 k8skube-proxy配置文件权限以进行强化。
我正在描述如何在将标志设置为无法找到的路径 ( ) 的kube-proxy情况下运行进程......--configvar/lib/kube-proxy/config.conf
事实上检查kube-proxy过程给出了这个:
[centos@cpu-node0 ~]$ ps -ef | grep kube-proxy
root 20890 20872 0 Oct20 ? 00:19:23 /usr/local/bin/kube-proxy --config=/var/lib/kube-proxy/config.conf --hostname-override=cpu-node0
centos 55623 51112 0 14:44 pts/0 00:00:00 grep --color=auto kube-proxy
Run Code Online (Sandbox Code Playgroud)
但该文件/var/lib/kube-proxy/config.conf不存在:
[centos@cpu-node0 ~]$ ll /var/lib/kube-proxy/config.conf
ls: cannot access /var/lib/kube-proxy/config.conf: No such file or directory
Run Code Online (Sandbox Code Playgroud)
为什么?
我正在使用AKSterraform 部署 k8s 集群。
群集已启用带有 azure Active Directory 的 rbac。
集群创建进展顺利,之后 terraform 尝试在集群上执行一些任务,例如创建k8s-roles storage classes....,并失败并显示Unauthorized错误消息,如下所示:
module.k8s_cluster.module.infra.kubernetes_storage_class.managed-premium-retain: Creating...
module.k8s_cluster.module.infra.kubernetes_cluster_role.containerlogs: Creating...
module.k8s_cluster.module.infra.kubernetes_namespace.add_pod_identity: Creating...
module.k8s_cluster.module.infra.kubernetes_storage_class.managed-standard-retain: Creating...
module.k8s_cluster.module.infra.kubernetes_storage_class.managed-premium-delete: Creating...
module.k8s_cluster.module.appgw.kubernetes_namespace.agic[0]: Creating...
module.k8s_cluster.module.infra.kubernetes_storage_class.managed-standard-delete: Creating...
Error: Unauthorized
on .terraform/modules/k8s_cluster/modules/infra/k8s-roles.tf line 1, in resource "kubernetes_cluster_role" "containerlogs":
1: resource "kubernetes_cluster_role" "containerlogs" {
Error: Unauthorized
on .terraform/modules/k8s_cluster/modules/infra/k8s-storages-classes.tf line 1, in resource "kubernetes_storage_class" "managed-standard-retain":
1: resource "kubernetes_storage_class" "managed-standard-retain" {
Error: Unauthorized
on .terraform/modules/k8s_cluster/modules/infra/k8s-storages-classes.tf line 14, in resource "kubernetes_storage_class" "managed-standard-delete":
14: resource "kubernetes_storage_class" "managed-standard-delete" { …Run Code Online (Sandbox Code Playgroud) 我正在尝试通过http调用设置并获取php-fpm统计信息。我知道可以使用service status命令,但是我想从浏览器中获取它。
我正在运行php7和apache,这就是我在服务器配置中所做的。
在apache端,我用以下命令创建了一个虚拟主机:
<LocationMatch "/fpm-status">
Order Allow,Deny
Allow from 127.0.0.1
ProxyPass fcgi://127.0.0.1:9000
</LocationMatch>
Run Code Online (Sandbox Code Playgroud)
在php pool配置中(/etc/php/7.0/fpm/pool.d/www.conf)我有这个:
[www]
user = www-data
group = www-data
listen = 127.0.0.1:9000
listen.owner = www-data
listen.group = www-data
pm = ondemand
pm.max_children = 1000
pm.start_servers = 150
pm.min_spare_servers = 50
pm.max_spare_servers = 400
pm.max_requests = 200
pm.process_idle_timeout = 5s
pm.status_path = /fpm-status
Run Code Online (Sandbox Code Playgroud)
但是在重启apache和php-fpm进程后,当我尝试使用curl时,我得到了以下输出:
admin@ip-10-3-23-78:~$curl http://localhost/fpm-status
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access …Run Code Online (Sandbox Code Playgroud) 我有一个特定的案例,我不确定是否可以使用AWS CodePipeline,并且通过谷歌搜索在文档和事件中都没有找到关于此的任何信息。
因此,我想知道是否可以在管道中设置两个源(它可以处于同一阶段,也可以处于不同阶段)。
这是我的用例:
我不知道我的目标规范是否明确,如果可以,可以如上所述在管道中使用两个源操作,以及如何实现此目标?
先感谢您。
干杯,吴ug
continuous-integration amazon-web-services continuous-delivery aws-codepipeline
我正在使用需要在AWS CloudFormation YAML模板中读取的PyYAML库编写自定义Python应用程序。
我知道模板是有效的CloudFormation模板,因为我使用validate-template测试了它们:
? aws cloudformation validate-template --template-body file://cloudformation.yml
Run Code Online (Sandbox Code Playgroud)
但是,当我尝试使用PyYAML库读取它们时,出现如下错误:
yaml.scanner.ScannerError:此处不允许映射值
和
无法确定标签“!Sub”的构造函数
和别的。
作为示例,我尝试以下AWS示例模板:
? curl -s \
https://raw.githubusercontent.com/awslabs/aws-cloudformation-templates/master/aws/services/CloudFormation/FindInMap_Inside_Sub.yaml \
-o FindInMap_Inside_Sub.yaml
Run Code Online (Sandbox Code Playgroud)
然后:
? python
Python 2.7.15 (default, Nov 27 2018, 21:40:55)
[GCC 4.2.1 Compatible Apple LLVM 10.0.0 (clang-1000.11.45.5)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import yaml
>>> yaml.load(open('FindInMap_Inside_Sub.yaml'))
Run Code Online (Sandbox Code Playgroud)
这导致:
yaml.constructor.ConstructorError: could not determine a constructor for the tag '!FindInMap'
in "FindInMap_Inside_Sub.yaml", line 89, column 45
Run Code Online (Sandbox Code Playgroud)
如何使用PyYAML之类的库解析CloudFormation YAML文件?
我正在尝试使用 ansible 完全部署我的 gitlab CICD 堆栈并自动注册运行程序。
我在我的剧本中使用以下任务来获取注册令牌并将其存储在事实中以供我的跑步者进一步注册,正如我在几个教程中看到的那样,我们可以从 gitlab 数据库获取注册令牌。
ansible 剧本任务:
- name: Extract Runner Registration Token directly from Gitlab DB
become: true
become_user: gitlab-psql
vars:
ansible_ssh_pipelining: true
query: "SELECT runners_registration_token FROM application_settings ORDER BY id DESC LIMIT 1"
psql_exec: "/opt/gitlab/embedded/bin/psql"
gitlab_db_name: "gitlabhq_production"
shell: '{{ psql_exec }} -h /var/opt/gitlab/postgresql/ -d {{ gitlab_db_name }} -t -A -c "{{ query }}"'
register: gitlab_runner_registration_token_result
Run Code Online (Sandbox Code Playgroud)
但此任务不会取回任何注册令牌(获取空字符串),因为application_settings表中不存在runners_registration_token列。但是该列存在,但返回的字符串被api 拒绝。runners_registration_token_encryptedrunners_registration_token_encryptedrunner-register
因此,我必须从 gitlab gui(在admin/runners中)复制跑步者注册令牌,将其硬编码到剧本中并再次运行剧本以成功注册堆栈。
有人可以解释一下 gitlab 在哪里存储 …
我已经按照这个 gitlab教程链接将我的 jenkins 服务器连接到 Gitlab。
一切都很顺利,我已经:
直到那里一切都很顺利。然后我将包含 a 的代码添加并推jenkinsFile送到我的 GitLab 存储库,并进入 Jenkins WebUI 查看构建状态,但管道显示绿色表示构建成功,虽然没有任何反应,但没有从 GitLab 检索到任何代码(如附加控制台输出屏幕截图),因此没有jenkinsFile执行,也没有显示错误消息。
我尝试从 WebUI 手动运行构建,但结果相同,无法git push events从 GitLab触发我的管道
我想我可能应该Git在Source Code Management部分中选择(我将其保留None,因为教程没有提及它),但如果我选择 Git 作为 SCM,我无法选择我的 GitLab API 令牌凭据,似乎我们无法使用 GitLab 插件(API 令牌)和同一构建项目的 Git …
gitlab ×2
kubernetes ×2
ansible ×1
apache ×1
aws-cli ×1
azure-aks ×1
fpm ×1
gitlab-ci ×1
jenkins ×1
kube-proxy ×1
php ×1
pip ×1
python ×1
python-venv ×1
python-wheel ×1
pyyaml ×1
rbac ×1
terraform ×1
yaml ×1