-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cloud-Control becomes Mission_Control!
* New install menu. * Rundeck can now be installed by Misson_Control. * Docker support. (docker-control project) * A chef-server container can now be installed. Accessible via HTTPS/4443. * All the variables can be edited in the "vars" file. * See CHANGELOG for more info.
- Loading branch information
Showing
33 changed files
with
867 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
<joblist> | ||
<job> | ||
<id>1804c8af-d5b1-42d8-be98-6107e8c1506d</id> | ||
<loglevel>INFO</loglevel> | ||
<sequence keepgoing='false' strategy='node-first'> | ||
<command> | ||
<exec>docker rmi $(docker images -q)</exec> | ||
</command> | ||
</sequence> | ||
<description>Delete all Docker images.</description> | ||
<name>Delete all images</name> | ||
<context> | ||
<project>docker-control</project> | ||
</context> | ||
<uuid>1804c8af-d5b1-42d8-be98-6107e8c1506d</uuid> | ||
</job> | ||
<job> | ||
<id>862b23c4-b269-49d7-b47b-784102a83997</id> | ||
<loglevel>INFO</loglevel> | ||
<sequence keepgoing='false' strategy='node-first'> | ||
<command> | ||
<exec>docker rm -f $(docker ps -q)</exec> | ||
</command> | ||
</sequence> | ||
<description>Delete all stopped containers!</description> | ||
<name>Delete all non-running containers</name> | ||
<context> | ||
<project>docker-control</project> | ||
</context> | ||
<uuid>862b23c4-b269-49d7-b47b-784102a83997</uuid> | ||
</job> | ||
<job> | ||
<id>cd820882-15bf-4f30-b7b3-ec4e60dd548a</id> | ||
<loglevel>INFO</loglevel> | ||
<sequence keepgoing='false' strategy='node-first'> | ||
<command> | ||
<scriptargs /> | ||
<script><![CDATA[#!/bin/bash | ||
docker ps -a]]></script> | ||
</command> | ||
</sequence> | ||
<description>List them all!</description> | ||
<name>List all containers</name> | ||
<context> | ||
<project>docker-control</project> | ||
</context> | ||
<uuid>cd820882-15bf-4f30-b7b3-ec4e60dd548a</uuid> | ||
</job> | ||
<job> | ||
<id>bbf54c33-fc96-48eb-a61e-f887917e6abe</id> | ||
<loglevel>INFO</loglevel> | ||
<sequence keepgoing='false' strategy='node-first'> | ||
<command> | ||
<scriptargs /> | ||
<script><![CDATA[#!/bin/bash | ||
docker ps]]></script> | ||
</command> | ||
</sequence> | ||
<description>List only the running containers</description> | ||
<name>List all running containers</name> | ||
<context> | ||
<project>docker-control</project> | ||
</context> | ||
<uuid>bbf54c33-fc96-48eb-a61e-f887917e6abe</uuid> | ||
</job> | ||
<job> | ||
<id>0ad015fb-9883-4f11-850e-effd25517d37</id> | ||
<loglevel>INFO</loglevel> | ||
<sequence keepgoing='false' strategy='node-first'> | ||
<command> | ||
<scriptargs /> | ||
<script><![CDATA[#!/bin/bash | ||
docker images]]></script> | ||
</command> | ||
</sequence> | ||
<description>List all local images</description> | ||
<name>List all images</name> | ||
<context> | ||
<project>docker-control</project> | ||
</context> | ||
<uuid>0ad015fb-9883-4f11-850e-effd25517d37</uuid> | ||
</job> | ||
</joblist> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
<joblist> | ||
<job> | ||
<id>a37ea70a-b691-4fad-a78e-f049000850eb</id> | ||
<loglevel>INFO</loglevel> | ||
<sequence keepgoing='false' strategy='node-first'> | ||
<command> | ||
<scriptargs /> | ||
<script><![CDATA[#!/bin/bash | ||
|
||
image_id=`docker images |grep cbuisson/chef-server |awk '{print $3}'` | ||
docker rmi -f $image_id | ||
|
||
echo "cbuisson/chef-server image has been deleted!"]]></script> | ||
</command> | ||
<command> | ||
<scriptargs /> | ||
<script><![CDATA[#!/bin/bash | ||
|
||
container_id=`docker ps -a |grep <%= CHEF_SERVER_CONTAINER_NAME %> |awk '{print $1}'` | ||
docker rm -f $container_id | ||
|
||
echo "<%= CHEF_SERVER_CONTAINER_NAME %> container has been deleted!"]]></script> | ||
</command> | ||
</sequence> | ||
<description>Find <%= CHEF_SERVER_CONTAINER_NAME %> image and container ID then delete all the files.</description> | ||
<name>Remove <%= CHEF_SERVER_CONTAINER_NAME %> container</name> | ||
<context> | ||
<project>chef_server-control</project> | ||
</context> | ||
<uuid>a37ea70a-b691-4fad-a78e-f049000850eb</uuid> | ||
</job> | ||
<job> | ||
<id>a82e287f-e142-40d8-ad29-f065ac2e2893</id> | ||
<loglevel>INFO</loglevel> | ||
<sequence keepgoing='false' strategy='node-first'> | ||
<command> | ||
<scriptargs /> | ||
<script><![CDATA[#!/bin/bash | ||
|
||
container_id=`docker ps -a |grep <%= CHEF_SERVER_CONTAINER_NAME %> |awk '{print $1}'` | ||
docker start $container_id | ||
sleep 5 | ||
echo "<%= CHEF_SERVER_CONTAINER_NAME %> container has been started!" | ||
|
||
container_ip=`docker inspect $container_id | grep IPAddress | cut -d '"' -f 4` | ||
full_line="chef_server_url 'https://$container_ip:4443'" | ||
old_ip=`cat /var/lib/rundeck/.chef/knife.rb |grep https` | ||
|
||
if [[ $full_line != $old_ip ]];then | ||
cat > /var/lib/rundeck/.chef/knife.rb << EOL | ||
log_level :info | ||
log_location STDOUT | ||
cache_type 'BasicFile' | ||
node_name 'admin' | ||
client_key '~/.chef/admin.pem' | ||
validation_client_name 'chef-validator' | ||
validation_key '/var/lib/rundeck/.chef/chef-validator.pem' | ||
chef_server_url 'https://$container_ip:4443' | ||
EOL | ||
|
||
echo -e "Updated rundeck knife.rb with new container IP!\n" | ||
echo -e "The IP have changed for that container!\nPlease run the command below and update your ~/.chef/knife.rb to macth the current Chef-Server IP!\n" | ||
echo -e "\e[1;36m sudo mission_control/scripts/update_chef_ip.rb\e[0m" | ||
fi | ||
]]></script> | ||
</command> | ||
</sequence> | ||
<description>Start container: <%= CHEF_SERVER_CONTAINER_NAME %></description> | ||
<name>Start <%= CHEF_SERVER_CONTAINER_NAME %></name> | ||
<context> | ||
<project>chef_server-control</project> | ||
</context> | ||
<uuid>a82e287f-e142-40d8-ad29-f065ac2e2893</uuid> | ||
</job> | ||
<job> | ||
<id>e6246fc8-9101-413c-a8e2-c2300b01aca8</id> | ||
<loglevel>INFO</loglevel> | ||
<sequence keepgoing='false' strategy='node-first'> | ||
<command> | ||
<scriptargs /> | ||
<script><![CDATA[#!/bin/bash | ||
|
||
container_id=`docker ps -a |grep <%= CHEF_SERVER_CONTAINER_NAME %> |awk '{print $1}'` | ||
docker stop $container_id | ||
|
||
echo "<%= CHEF_SERVER_CONTAINER_NAME %> container has been stopped!"]]></script> | ||
</command> | ||
</sequence> | ||
<description>Shutdown container: <%= CHEF_SERVER_CONTAINER_NAME %></description> | ||
<name>Stop <%= CHEF_SERVER_CONTAINER_NAME %></name> | ||
<context> | ||
<project>chef_server-control</project> | ||
</context> | ||
<uuid>e6246fc8-9101-413c-a8e2-c2300b01aca8</uuid> | ||
</job> | ||
</joblist> |
Oops, something went wrong.