投稿時間:2021-09-04 19:30:49 RSSフィード2021-09-04 19:00 分まとめ(34件)

カテゴリー等 サイト名等 記事タイトル・トレンドワード等 リンクURL 頻出ワード・要約等/検索ボリューム 登録日
AWS lambdaタグが付けられた新着投稿 - Qiita 【AWS】MediaConvertを用いてHLS VOD配信 https://qiita.com/yamato1491038/items/b18a372e01cd1a33e383 Sのバケット作成サービスからSを選択し、任意の名前のバケットを作成する。 2021-09-04 18:00:58
python Pythonタグが付けられた新着投稿 - Qiita Python>pandas>DataFrame:マルチインデックス・マルチカラム構造のDataFrameの操作 https://qiita.com/k_koba619/items/a71cf59e010c24597e3d PythongtpandasgtDataFrameマルチインデックス・マルチカラム構造のDataFrameの操作概要groupbyメソッドを使ってデータをまとめると、マルチインデックスを持ったDataFrameのデータが出てくることがよくあるが、マルチインデックスのデータの取り扱いになれていなく操作がわからなくなることが多発。 2021-09-04 18:05:28
js JavaScriptタグが付けられた新着投稿 - Qiita Rails インクリメンタルサーチ https://qiita.com/223yuta/items/846b6fe6e3bf945291fb 引用Wikipediaインクリメンタルサーチ機能の作成まずは普通の検索機能を作成し、その後インクリメンタルサーチ機能に変更していきたいと思います。 2021-09-04 18:56:22
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) Google アナリティクスでのaタグでないボタンのクリック数計測について https://teratail.com/questions/357742?rss=all Googleアナリティクスでのaタグでないボタンのクリック数計測についてGooglenbspAnalyticsGAで画像アップロードのボタンのクリック数を計測したいのですが、調べるとaタグ内にコードを追加する方法ばかり出てきます。 2021-09-04 18:35:26
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) 【JavaScript】【jQuery】table要素を使った表の作り方 https://teratail.com/questions/357741?rss=all 【JavaScript】【jQuery】table要素を使った表の作り方前提・実現したいことJavaScript及びjQuery初心者です。 2021-09-04 18:32:21
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ubuntu 20.04にて、apt-get update でエラーが出る https://teratail.com/questions/357740?rss=all ubuntuにて、aptgetupdateでエラーが出る前提・実現したいことOSUbuntunbsp実行したコマンドsudonbspaptgetnbspupdate発生している問題・エラーメッセージ画像ですいませんが、下記のエラーが発生してしまい、対象方法が分からず。 2021-09-04 18:31:04
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) ASP.NET Webシステムのタイムアウトの設定が反映されないのですが・・・ https://teratail.com/questions/357739?rss=all ASPNETWebシステムのタイムアウトの設定が反映されないのですが・・・ASPNETのWebシステムのタイムアウトの設定値を変更しても反映されません。 2021-09-04 18:29:05
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) GAS|Google Document|見出しの一括適用におけるエラー https://teratail.com/questions/357738?rss=all GASGoogleDocument見出しの一括適用におけるエラー前提・実現したいこと「指定の文字列を検索して見出し適用する」という機能を実装中に以下のエラーメッセージが発生しました。 2021-09-04 18:23:57
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) スペースで区切られている日付データをdatetime型にしたい https://teratail.com/questions/357737?rss=all スペースで区切られている日付データをdatetime型にしたい前提・実現したいことtxtファイルを読み込み、dfを作成しようとしています。 2021-09-04 18:20:01
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) certbotを再インストールしてもcertbot-auto: が見つからない https://teratail.com/questions/357736?rss=all certbotを再インストールしてもcertbotautoが見つからないこんにちは。 2021-09-04 18:08:30
Program [全てのタグ]の新着質問一覧|teratail(テラテイル) HTML&PHPのフォームでcheckboxで値を受け取るときのname属性の添え字のありなしについて https://teratail.com/questions/357735?rss=all HTMLampPHPのフォームでcheckboxで値を受け取るときのname属性の添え字のありなしについて前提・実現したいことHTMLampPHPでのformでcheckboxを扱うときの質問です。 2021-09-04 18:00:32
Ruby Rubyタグが付けられた新着投稿 - Qiita Rails インクリメンタルサーチ https://qiita.com/223yuta/items/846b6fe6e3bf945291fb 引用Wikipediaインクリメンタルサーチ機能の作成まずは普通の検索機能を作成し、その後インクリメンタルサーチ機能に変更していきたいと思います。 2021-09-04 18:56:22
AWS AWSタグが付けられた新着投稿 - Qiita Lamdaの構築 https://qiita.com/cloudmaster/items/668584360acd9fb72ca8 Lamdaの構築はじめにSAAC取得時にUdemyのコースで色々とハンズオンしたのですが復習となり、構成図はそのコースより引用します。 2021-09-04 18:48:27
AWS AWSタグが付けられた新着投稿 - Qiita [AWS] Amazon EC2 https://qiita.com/mhhkn098/items/88da6fd43ff4ccedcb6b awsamazonecec 2021-09-04 18:20:17
AWS AWSタグが付けられた新着投稿 - Qiita 【AWS】MediaConvertを用いてHLS VOD配信 https://qiita.com/yamato1491038/items/b18a372e01cd1a33e383 Sのバケット作成サービスからSを選択し、任意の名前のバケットを作成する。 2021-09-04 18:00:58
Docker dockerタグが付けられた新着投稿 - Qiita docker 環境構築(mac) https://qiita.com/Ixy_194/items/f6f507d10d3ba2e44fe6 docker環境構築mac最近PCを入れ替えたので備忘を兼ねてメモやりたいことdockerdockercomposeを使えるようにする環境情報swversProductNameMacOSXProductVersionBuildVersionHやったことDockerforDesktopformacのインストールDockerforDesktopformacのインストール公式サイトからダウンロードダウンロードしてきたイメージをインストールdockervDockerversionbuildbdインストールできました続いて、dockercomposeも入れなくては、、、と思っていたが、DockerDesktopforMacには他のDockerアプリとともにComposeが含まれています。 2021-09-04 18:16:08
Docker dockerタグが付けられた新着投稿 - Qiita minikube を利用して Docker と Kubernetes が入った開発環境を一発で構築する for Windows / Hyper-V https://qiita.com/yokra9/items/282fa55ebc8a67227870 これらの情報を環境変数に設定すると、DockerCLIがノード上のDockerEngineと通信できるようになります。 2021-09-04 18:02:48
Docker dockerタグが付けられた新着投稿 - Qiita DockerでLaravel×Nginxの開発環境を構築する(PHP8) https://qiita.com/maatanman/items/e190675a807c07c22033 最後に今回はかなりシンプルに最低限動作する環境をDockerを用いて構築してみました。 2021-09-04 18:01:49
golang Goタグが付けられた新着投稿 - Qiita 不変(readOnly)が存在しないGo言語で、どうやって構造体の持つ値を不変にするか? https://qiita.com/takuya_sss/items/3b0c9196ce8a2bf5654b 別パッケージに定義し、外部から参照できないようにするGo言語では構造体を定義する時に、頭文字を大文字にするか小文字にするかで外部のパッケージからその値が参照できるかどうかを決定します。 2021-09-04 18:10:33
Azure Azureタグが付けられた新着投稿 - Qiita Azure Application Gateway のパスベースルーティングを試してみる https://qiita.com/komiyasa/items/c38b933861ec18ad3e09 本日参考にするのはこちらgtチュートリアルAzurePortalを使用してパスベースのルーティング規則のあるアプリケーションゲートウェイを作成するバックエンドサーバーの仮想マシン作成まずはバックエンドのIISサーバーをつ作成します。 2021-09-04 18:27:20
Git Gitタグが付けられた新着投稿 - Qiita Git自分メモ https://qiita.com/ueki5/items/82fc8055d9f37e9f87f8 2021-09-04 18:58:29
Git Gitタグが付けられた新着投稿 - Qiita GitでSJISを使う https://qiita.com/ueki5/items/3218a7f33ee52b249d6a GitでSJISを使う文字化け要素コミットメッセージUTF固定と思われる→格納変更できない変更しないべき表示localeに合わせて変換してくれないGitbashMINGWlocaleデフォルトLANGjaJPUTFLCCTYPEjaJPUTFLCNUMERICjaJPUTFLCTIMEjaJPUTFLCCOLLATEjaJPUTFLCMONETARYjaJPUTFLCMESSAGESjaJPUTFLCALL→profile等で変更は可能ターミナルOptions→TEXT→「localecharacterset」→変更可ファイル名の表示lslocaleとターミナルの設定を合わせればUTFでもSJISでも問題無く表示される。 2021-09-04 18:57:56
海外TECH DEV Community Django Cookie-Cutter - Simple Theme-able Generator https://dev.to/sm0ke/django-cookie-cutter-simple-theme-able-generator-1b7p Django Cookie Cutter Simple Theme able GeneratorHello Coders This article presets Django Cookie Cutter as a simple way to build a Django project with less manual coding and the possibility to customize a few things like UI design and database type SQLite MySql or PostgreSQL For newcomers CookieCutter is a command line utility that creates projects from project templates and Django is a leading web framework built by experts using a batteries included concept Thanks for reading Content provided by App Generator What s in the boxUsing the Django Cookie Cutter tool any developer can generate simple Django projects like the ones listed below with customized design and database backends plus minor things like project name and README instructions free Django Soft UI simple Django dashboard with Soft UI design free Django Volt a modern dashboard with Bootstrap design free Django Datta Able open source colorful dashboard How to use itTo use this simple generator a minimal programming kit should be installed in the workstation starting with Python and GIT Python a modern script language used for many types of projectsGIT a command line tool used to download sources from GithubA modern editor like VSCode Atom or even Notepad Once we have all the tools properly installed we can move on and build a Django project Step Install dependencies cookie cutter and GitPython pip install cookiecutter pip install GitPythonThe above command uses PIP the official package manager for Python to install required modules globally in the system The recommended way to install packages is to use a virtual environment that isolates the installation as shown below Virtualenv modules installation Unix based systems virtualenv env source env bin activate Install modules pip install cookiecutter pip install GitPythonStep Generate the project cookiecutter Step Customize the future projectMost of the commands provide a default value selectable by an ENTER gt gt gt Project Name Option gt gt gt project name Django Seed project django volt gt gt gt Project Slug is the directory name gt gt gt project slug django volt gt gt gt Project Description saved in the README file gt gt gt description A simple Django project My Simple Django Project gt gt gt Project Author saved in the README file gt gt gt author name Smke gt gt gt Author Email saved in the README file gt gt gt email bill microsoft com gt gt gt Project Version saved in the README file gt gt gt version gt gt gt UI Kit Volt default option gt gt gt Select theme volt soft ui datta able gt gt gt Database SQLite default option Select database sqlite mysql postgresql gt gt gt Database Credentials Used to configure the connection gt gt gt database name appseed django db name gt gt gt database user appseed user db user gt gt gt database pass Pass SuperScret HgdvIn the end the UI is downloaded from a public repository and injected into the codebase Let s open the generated directory django volt and visualize the codebase Item is the project README customized to explain how to build the project according to the selected options database project name Item applications that provide basic features like authentication forms validation and UI Theme integration The next logical step is to follow the build instructions presented in the README file and start the generated project Step Create a virtual environment Virtualenv modules installation Unix based systems virtualenv env source env bin activateStep Install project dependencies Install modules pip install r requirements txtStep Set up the database create tables python manage py makemigrations python manage py migrateStep Start the generated Django project Start the application development mode python manage py runserver Access the web app in the browser The project should look like the original Volt Dashboard demo link and the log in page is shown by default for guest users Once we create a new user and Sign IN the access to the private pages is unlocked Django Cookie Cutter Volt Dashboard PageIn the same way we can build more Django projects but using different UI kits without coding anything Soft UI A modern Bootstrap designDesigned for those who like bold elements and beautiful websites Soft UI Dashboard is ready to help you create stunning websites and web apps Soft UI Dashboard is built with over frontend individual elements like buttons inputs navbars nav tabs cards or alerts giving you the freedom of choosing and combining Django Soft UI Dashboard LIVE Demo Datta Able a colorful dashboardDatta Able Bootstrap Lite is the most stylized Bootstrap Lite Admin Template around all other Lite Free admin templates in the market It comes with high feature rich pages and components with fully developer centric code Datta Able Django LIVE deploymentThe Django Cookie Cutter tool will be updated with more options deployment UI Themes and more featured bundled in the codebase New themes CoreUI AdminLTE popular open source templates Deployment AWS Google Cloud HEROKU DockerModules Data tables Charts Stripe PaymentsThe full list with future evolutions can be found here Django Codebase SPECS Thanks for reading For more resources please access More Django Dashboards built with modern UI kitsOpen source Admin Dashboards curated index provided by AppSeedFree React Dashboards a popular article published on Dev to 2021-09-04 09:50:47
海外TECH DEV Community Hooks in React https://dev.to/surajmore98/hooks-in-react-4f6a Hooks in ReactHooks are a new feature introduced in React and available in later versions We can use state and other features of react by using hooks React has two ways of creating component one is using class and other is using function using class to generate component needs to add react boiler plate code because of that using function for generating component is introduced to use state like features of react in later way hooks are useful There is certain hooks that react provide us useState useEffect useRef and useReducer but we can create custom hooks as per our requirements useState as name suggests it used to handle state of component It helps to manage state between component re renders lets look at example below we have one button Click Me on clicking that button text should be changed to title changed export default function App let title Initial header const handleClick gt title title changed console log title return lt div className App gt lt h gt title lt h gt lt button onClick handleClick gt Click Me lt button gt lt div gt as we can see when button is clicked the title value is changed in console but on browser it shows old value to update value component needs to re render and between that rendering process we also need to maintain updated state This thing can be achieved using useStateimport useState from react export default function App const title setTitle useState Initial header const handleClick gt setTitle title changed return lt div className App gt lt h gt title lt h gt lt button onClick handleClick gt Click Me lt button gt lt div gt useEffect useEffect hook is used to handle activities when component renders There is some syntax variation is used to customize useEffect executes at component s initial render useEffect gt executes at component s state title is changed useEffect gt title executes at component s renders useEffect gt 2021-09-04 09:31:25
海外TECH DEV Community Automating Kubernetes Cluster on AWS using Ansible and deploying WordPress with MySQL on k8s cluster https://dev.to/surajwarbhe/automating-kubernetes-cluster-on-aws-using-ansible-and-deploying-wordpress-with-mysql-on-k8s-cluster-3p4c Automating Kubernetes Cluster on AWS using Ansible and deploying WordPress with MySQL on ks cluster USE CASECreate Ansible Playbook to launch AWS EC InstanceCreate Ansible Playbook to configure Docker over those instancesCreate Playbook to configure KS Master KS Worker Nodes on the above created EC Instances using kubeadmLaunch a WordPress and MySQL database connected to it in the respective slavesExpose the WordPress pod and the client able to hit the WordPress IP with its respective port Pre requisite FOR RHEL Controller node should be setup with ansible installation and configuration when controller node is RHELCreate one IAM user having Administrator Access and note down their access key and secret keyCreate one Key pair in pem format on AWS Cloud download it in your local system and transfer it over RHEL through WinSCP STEP Ansible Installation and ConfigurationInstall Ansible on Base OS RHEL configure ansible configuration file To do this use below commands yum install python ypip install ansible yvim etc ansible ansible cfgNOTE Python should be installed on your OS to setup Ansible Write below commands in your configuration ansible cfg file For this you can prefer any editor like vi vim gedit defaults inventory root ip txt inventory pathhost key checking Falsecommand warnings Falsedeprecation warnings Falseask pass Falseroles path root roles roles pathforce valid group names ignoreprivate key file root awskey pem your key pair remote user ec user privilege escalation become Truebecome method sudobecome user rootbecome ask pass False STEP Create Ansible RolesGo inside your roles workspacecd rolesUse Below commands to create different rolesFor Kubernetes ClusterFor Kubernetes MasterFor Kubernetes Slaves ansible galaxy init lt role name gt ansible galaxy init kube clusteransible galaxy init ks masteransible galaxy init ks slaveansible galaxy init wordpress mysql STEP Write role for Kubernetes ClusterGo inside the tasks folder We have to write entire tasks inside this foldercd roles kube cluster tasksvim main ymlI am going to create cluster over Amazon Linux instances Write below source code inside it name Installing boto amp boto libraries pip name item state present loop lib names name Creating Security Group for Ks Cluster ec group name sg name description Security Group for allowing all port region region name aws access key access key aws secret key secret key rules proto all cidr ip rules egress proto all cidr ip name Launching three EC instances on AWS ec key name keypair instance type instance flavour image ami id wait true group sg name count vpc subnet id subnet name assign public ip yes region region name state present aws access key access key aws secret key secret key instance tags Name item register ec loop instance tag name Add st instance to host group ec master add host hostname ec results instances public ip groupname ec master name Add nd instance to host group ec slave add host hostname ec results instances public ip groupname ec slave name Add rd instance to host group ec slave add host hostname ec results instances public ip groupname ec slave name Waiting for SSH wait for host ec results instances public dns name port state started Explanation of Source Code We are using pip module to install two packages ーboto amp boto because these packages has the capability to contact to AWS to launch the EC instances ec group module to create Security Group on AWS ec module to launch instance on AWS register keyword will store all the Metadata in a variable called ec so that in future we can parse the required information from it loop which again using one variable which contains one list item keyword we are calling the list values one after another add host module which has the capability to create one dynamic inventory while running the playbook hostname keyword tells the values to store in the dynamic host group wait for module to hold the playbook for few seconds till all the node s SSH service started access key and secret key are stored inside vault files to hide it from other users Go inside the vars folder We have to write entire variables inside this folder We can directly mention variables inside tasks file but it is good practice to write them inside vars files so that we can change according to our requirements cd roles kube cluster varsvim main ymlWrite below source code inside it instance tag master slave slavelib names boto botosg name Allow All SGregion name ap south subnet name subnet feami id ami affedkeypair awskeyinstance flavour t small STEP Write role for Kubernetes MasterFollowing are the steps which have to include in role for configuring the ks master Installing docker and iproute tcConfiguring the Yum repo for KubernetesInstalling kubeadm kubelet amp kubectl programEnabling the docker and KubernetesPulling the config imagesConfiguring the docker daemon json fileRestarting the docker serviceConfiguring the Ip tables and refreshing sysctlStarting kubeadm serviceSetting HOME directory for kube DirectoryCopying file config fileInstalling Addons e g flannelCreating the tokenStore output of token in a file Go inside the tasks folder We have to write entire tasks inside this foldercd roles ks master tasksvim main ymlWrite below source code inside it name Installing docker and iproute tc package name docker iproute tc state present name Configuring the Yum repo for kubernetes yum repository name kubernetes description Yum for ks baseurl enabled yes gpgcheck yes repo gpgcheck yes gpgkey name Installing kubeadm kubelet kubectl program yum name kubelet kubectl kubeadm state present name Enabling the docker and kubenetes service name item state started enabled yes loop kubelet docker name Pulling the config images shell kubeadm config images pull name Confuring the docker daemon json file copy dest etc docker daemon json content exec opts native cgroupdriver systemd name Restarting the docker service service name docker state restarted name Configuring the Ip tables and refreshing sysctl copy dest etc docker daemon json content exec opts native cgroupdriver systemd name systemctl shell sysctl system name Starting kubeadm service shell kubeadm init ignore preflight errors all name Creating kube Directory file path HOME kube state directory name Copying file config file shell cp i etc kubernetes admin conf HOME kube config ignore errors yes name Installing Addons e g flannel shell kubectl apply f name Creating the token shell kubeadm token create print join command register token debug msg token stdout Explanation of Source Code We need to install kubeadm program on our master node to setup Ks cluster We are installing Docker Kubeadm amp iproute tc packages on our Master Instance service module is used to start the docker amp kubelet service command module to run kubeadm command which will pull all the Docker Images required to run Kubernetes Cluster We need to change our Docker default cgroup to systemd otherwise kubeadm won t be able to setup Ks cluster To do that at first using copy module we are creating one file etc docker daemon json amp putting some content in it Next using command module we are initializing the cluster amp then using shell module we are setting up kubectl command on our Master Node Next using command module I deployed Flannel on the Kubernetes Cluster so that it create the overlay network setup Also the nd command module is used to get the token for the slave node to join the cluster Using register I stored the output of nd command module in a variable called token Now this token variable contain the command that we need to run on slave node so that it joins the master node STEP Write role for Kubernetes SlavesFollowing are the steps which have to include in role for configuring the ks slaves Installing docker and iproute tcConfiguring the Yum repo for KubernetesInstalling kubeadm kubelet kubectl programEnabling the docker and KubernetesPulling the config imagesConfiguring the docker daemon json fileRestarting the docker serviceConfiguring the IP tables and refreshing sysctlCopy the join command which we store while configuring masterGo inside the tasks folder We have to write entire tasks inside this foldercd roles ks slave tasksvim main ymlWrite below source code inside it name Installing docker and iproute tc package name docker iproute tc state present name Configuring the Yum repo for kubernetes yum repository name kubernetes description Yum for ks baseurl basearch enabled yes gpgcheck yes repo gpgcheck yes gpgkey name Installing kubeadm kubelet kubectl program yum name kubelet kubectl kubeadm state present name Enabling the docker and kubenetes service name item state started enabled yes loop kubelet docker name Pulling the config images shell kubeadm config images pull name Confuring the docker daemon json file copy dest etc docker daemon json content exec opts native cgroupdriver systemd name Restarting the docker service service name docker state restarted name Configuring the Ip tables and refreshing sysctl copy dest etc sysctl d ks conf content net bridge bridge nf call iptables net bridge bridge nf call iptables name systemctl shell sysctl system name joining to Master command hostvars groups ec master token stdout STEP Write role for Wordpress and MySQL SetupFollowing are the steps which have to include in role for configuring the Wordpress Go inside the files folder of wordpress mysql role We have to write entire configuration files inside this folder We have to create files here to create pods setup of PVC and secrets file cd roles wordpress mysql filesvim wordpress ymlvim pvc wordpress ymlvim mysql ymlvim pvc mysql ymlvim secret ymlWrite Below source to configure Wordpress installation part inside wordpress yml fileapiVersion vkind Servicemetadata name wordpress labels app wordpressspec ports port nodePort selector app wordpress tier frontend type LoadBalancer apiVersion apps v for versions before use apps vbetakind Deploymentmetadata name wordpress labels app wordpressspec selector matchLabels app wordpress tier frontend strategy type Recreate template metadata labels app wordpress tier frontend spec volumes name wordpress persistent storage persistentVolumeClaim claimName wordpress pv claim containers image wordpress apache name wordpress env name WORDPRESS DB HOST value wordpress mysql name WORDPRESS DB PASSWORD valueFrom secretKeyRef name mysqlsecret key password ports containerPort name wordpress volumes volumeMounts name wordpress persistent storage mountPath var www htmlWrite Below source to setup PVC for Wordpress in pvc wordpress yml file apiVersion vkind PersistentVolumeClaimmetadata name wordpress pv claim labels app wordpress tier frontendspec storageClassName resources requests storage Gi accessModes ReadWriteOnce apiVersion vkind PersistentVolumemetadata name wordpress pvspec storageClassName capacity storage Gi accessModes ReadWriteOnce hostPath path wordpressdataWrite Below source to configure MYSQL installation part inside mysql yml fileapiVersion vkind Servicemetadata name wordpress mysql labels app wordpressspec ports port selector app wordpress tier mysql clusterIP None apiVersion apps v for versions before use apps vbetakind Deploymentmetadata name wordpress mysql labels app wordpressspec selector matchLabels app wordpress tier mysql strategy type Recreate template metadata labels app wordpress tier mysql spec volumes name mysql persistent storage persistentVolumeClaim claimName mysql pv claim containers image mysql name mysql env name MYSQL ROOT PASSWORD valueFrom secretKeyRef name mysqlsecret key password name MYSQL USER value udit name MYSQL DATABASE value taskdb ports containerPort name mysql volumeMounts name mysql persistent storage mountPath var lib mysqlWrite Below source to setup PVC for MySQL in pvc mysql yml file apiVersion vkind PersistentVolumeClaimmetadata name mysql pv claim labels app wordpress tier mysqlspec storageClassName resources requests storage Gi accessModes ReadWriteOnce apiVersion vkind PersistentVolumemetadata name msql pvspec storageClassName capacity storage Gi accessModes ReadWriteOnce hostPath path mysqldataLastly create a secrete file secret yml which will contain the password of the MySQL database apiVersion vkind Secretmetadata name Surajdata password Mysqlpass Go inside the tasks folder We have to write entire tasks inside this foldercd roles wordpress mysql tasksvim main ymlWrite below source code inside it name Copying Wordpress and MySQL files to Ks Master Node copy src item dest root loop mysql yml pvc mysql yml pvc wordpress yml secret yml wordpress yml name Creating directory over which MySQL container mounts the PersistentVolume at var lib mysql file path mysqldata state directory name Creating directory over which WordPress container mounts the PersistentVolume at var www html file path wordpressdata state directory name Configuration and Setup of Wordpress and MySQL shell kubectl create f root item loop mysql yml pvc mysql yml pvc wordpress yml wordpress yml STEP Write Ansible Vault FilesGo to your roles workspaceRun below command and create vault file ansible vault create lt filename gt ymlansible vault create cred ymlIt will ask to provide one vault password amp provide as per your choice Then open it with editor create two variables in this file amp put your AWS access key amp secret key as values For example access key ABCDEFGHIJKLMNsecret key abcdefghijklmnSave the file with command wq STEP Create Setup fileNow it s finally the time to create the setup yml file inside same workspace which we gonna run to setup this entire infrastructure on AWS hosts localhost gather facts no vars files cred yml tasks name Running kube cluster role include role name kube cluster hosts ec master gather facts no tasks name Running Ks Master Role include role name ks master hosts ec slave gather facts no tasks name Running Ks Slave Role include role name ks slave hosts ec master gather facts no tasks name Running Wordpress MySQL Role include role name wordpress mysqlWrite proper hostname vault file name and role name STEP RUN your Ansible Playbookuse below commands to run your ansible playbook ansible playbook setup yml ask vault passNext it will prompt you to pass the password of your Ansible Vault cred yml file provide your password YAY IT RUN SUCCESSFULLY AND SETUP ENTIRE INFRASTRUCTURE STEP TESTING Now lets check our multi node cluster is using below commandskubectl get nodes Here we can see our who cluster is launched successfully and our all nodes is ready phase Now once your pods are ready then you can take the public of any node either master or slave with the exposed port you will landed to the Wordpress login page and then enter password and username of the mysql database and hit the run installation button YAY Your Wordpress application is ready GitHub Link LinkedIn profile 2021-09-04 09:17:44
海外ニュース Japan Times latest articles In LDP leadership race, Suga to back vaccine czar and Abe to support hawkish ex-minister https://www.japantimes.co.jp/news/2021/09/04/national/politics-diplomacy/suga-backs-kono-ldp-election/ In LDP leadership race Suga to back vaccine czar and Abe to support hawkish ex ministerThe prime minister will back popular chief Taro Kono while his predecessor will support former internal affairs minister Sanae Takaichi in the poll later this 2021-09-04 18:39:44
海外ニュース Japan Times latest articles Japan likely to extend COVID-19 state of emergency in major cities https://www.japantimes.co.jp/news/2021/09/04/national/soe-extension-likely/ Japan likely to extend COVID state of emergency in major citiesThe government s coronavirus response task force is expected to formally decide on the extension after gathering the opinions of local governments and infectious disease experts 2021-09-04 18:19:35
ニュース BBC News - Home Covid-19: Decision on jabs for children due in days https://www.bbc.co.uk/news/health-58445499?at_medium=RSS&at_campaign=KARANGA covid 2021-09-04 09:42:26
ニュース BBC News - Home Tokyo Paralympics: Hannah Cockroft wins seventh gold, Charlotte Henshaw and Laura Sugar triumph https://www.bbc.co.uk/sport/disability-sport/58445274?at_medium=RSS&at_campaign=KARANGA Tokyo Paralympics Hannah Cockroft wins seventh gold Charlotte Henshaw and Laura Sugar triumphHannah Cockroft wins her seventh Paralympic gold medal as para canoeists Charlotte Henshaw and Laura Sugar also triumph on day in Tokyo 2021-09-04 09:32:05
ニュース BBC News - Home Government communications are failing, says ex-No 10 adviser https://www.bbc.co.uk/news/uk-politics-58437469?at_medium=RSS&at_campaign=KARANGA covid 2021-09-04 09:17:48
北海道 北海道新聞 吉本が暫定首位、通算-10 女子ゴルフ第2日 https://www.hokkaido-np.co.jp/article/585792/ 女子ゴルフ 2021-09-04 18:16:00
北海道 北海道新聞 楽8―5西(4日) 楽天の酒居がプロ初セーブ https://www.hokkaido-np.co.jp/article/585789/ 鈴木大 2021-09-04 18:06:00
ビジネス 東洋経済オンライン 「ペット」業界がコロナ後も強いと言えるワケ 巣ごもりに加え、高機能フードや保険に勢い | ペット | 東洋経済オンライン https://toyokeizai.net/articles/-/452427?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2021-09-04 18:30:00
ビジネス 東洋経済オンライン オートバックスが整備工場を続々買う訳【動画】 カー用品を主軸とするモデルから脱却できるか | カー用品・メンテナンス | 東洋経済オンライン https://toyokeizai.net/articles/-/452962?utm_source=rss&utm_medium=http&utm_campaign=link_back 東洋経済オンライン 2021-09-04 18:05:00

コメント

このブログの人気の投稿

投稿時間:2021-06-17 05:05:34 RSSフィード2021-06-17 05:00 分まとめ(1274件)

投稿時間:2021-06-20 02:06:12 RSSフィード2021-06-20 02:00 分まとめ(3871件)

投稿時間:2020-12-01 09:41:49 RSSフィード2020-12-01 09:00 分まとめ(69件)